![]() I have attached the needed CSV file needed to run this example.Įxample 1: CSV file WITHOUT variable namesĭownload population_a.csv //load data from CSV file Here is an example that will load a CSV file and create a. This will create a new variable (or overwrite an existing one) with the contents of the file x.fmt ![]() To later load this matrix file, you can do this: load x ![]() ![]() It is very fast and simple to use, but does not allow you to associate variable names, nor does it allow you to later read it a few rows at a time. This will save the data in x into a file on disk named x.fmt. For that take a look at readr.Įxample 2: Create a GAUSS matrix file x.fmt save x Note that there are more complicated functions for reading in specified rows or iterating over the dataset to read a bit at a time. newx = loadd("mydata") Īfter this command newx and x should contain the same values. You can load this dataset into another variable with the loadd command (or pass it into one of the GAUSS functions that takes a dataset as an input). Now that the data is loaded into memory in a variable x, you can save the data into a dataset or matrix file for use later with GAUSS.Įxample 1: Create a dataset file mydata.dat string vnames = Īfter executing the line above, you will have the matrix x in GAUSS's memory and you will have a GAUSS dataset on disk named mydata.dat.
0 Comments
Leave a Reply. |