Aptech Systems, Inc. Worldwide Headquarters
Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286
Ready to Get Started?
Request Quote & Product Information
Training & Events
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Q&A: Register and Login
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Recent Tagsapplications character vectors CML CMLMT Constrained Optimization datasets dates dlibrary dllcall error error handling errors Excel FANPACMT file i/o floating network GAUSS Engine graphics GUI hotkeys installation Java API license licensing linux loading data matrices matrix matrix manipulation Maxlik MaxLikMT Memory optimization Optmum output PQG graphics procs RAM random numbers string functions strings structures threading Time Series writing data
Time Series 2.0 MT
Find out more now
Time Series MT 2.1
Trouble keeping variable names when I load data from CSV or Excel file
Thank you for your help. But loading excel file is still not easy. GAUSS is much more difficult than other programs.
Anyway, I converted breaks.xlsx to breaks.csv and loaded it as you taught. The file is 32 by 367 and the first row contains the variable names. It was loaded but all the data is shown +DEN.
So I deleted the first row and reloaded. It works. However, how can I add the variable names?
Instead, can I the file correctly without deleting the variable name row????
The variable name row is still there. It is just loaded into the matrix as character data. This may help explain character data.
If you leave the data in the Excel file, you can read the first row of variable names in as a string array like this:
//calculate the cell range for the first 367 rows //of an Excel file range = xlsMakeRange(1|1, 1|367); varnames = spreadSheetReadSA("myfile.xls", range, 1);
Once you convert the Excel file to CSV and read in with the load command, you can use the function cvtos to convert a character vector to a string:
//load data load myvar[32, 367] = myfile.csv; //create a 367x1 string array containing all variable names varnames = cvtos(myvar[1, .]);
As an example of starting from scratch and loading in the data and variable names from your original Excel file, we can accomplish this in thre lines of code:
range = xlsMakeRange(1|1, 1|367); varnames = spreadSheetReadSA("myfile.xls", range, 1); mydata = spreadSheetReadM("myfile.xls", "B1", 1);