Export Data in Gauss 19

I just heard that Gauss 19 is available now and I wondered if the new features include in File an option to Export Data to excel spreadsheet formats (*.xls and *xlsx), text data (delimited, *.csv, fixed- or free-format, ...)?

4 Answers



0



The saved function in GAUSS 19 will allow you to save datasets in CSV and XLS/XLSX format. It will detect the file type you wish to create by the file extension of the file name you pass in. For example:

// Simple matrix to save
X = { 1 2 3,
      4 5 6,
      7 8 9 };

// Variable names for file
vnames = "GDP" $| "Imports" $| "Exports";

// Create comma separated data file
// First row will contain variable names
// remaining rows will contain data from 'X'
saved(X, "mydata.csv", vnames);

// Create XLSX dataset
// with A1:C1 containing the variable names
// and A2:C4 containing the data from
// the matrix 'X'
saved(X, "mydata.xlsx", vnames);

will create a file named mydata.csv with these contents:

GDP,Imports,Exports
1,2,3
4,5,6
7,8,9

and create the file mydata.xlsx as described in the comments in the code snippet.

aptech

1,773


0



Thank you for your prompt answer, but I guess my question is different.

Currently, Gauss has in "File" an easy option for the user to "Import Data". So, since there is no an "Export Data" option that makes easier to export data (or even results) that after importing/loading a data set, I am asking if the very new release (Gauss 19) adds the "Export Data" option.



0



Are you thinking that you would select File > Export Data and then GAUSS would open up a dialog window similar to the File Import window, where you would have the option to select from matrices, arrays, strings, etc in your GAUSS workspace to export to a file?

GAUSS 19 does not have something like this, but it is an interesting idea. I would imagine it would be nice for this dialog to allow you to add multiple different variables into the exported dataset and to be able to specify the header names by either typing them in or selecting them from a string array that is already in GAUSS.

Assuming that my understanding is correct, can you think of any other features that would be helpful for this Data Export Window?

aptech

1,773


0



Exactly!

Other possible features that occur to me are:

  • selecting a range of observations
  • allow to export the Gauss file to other formats (e.g., SAS, R, and Stata formats) and ODBC data sources in case multiple software are used within and across team projects.

These feature would be also great to have it available when selecting File > Import Data

 

 

 

Your Answer

4 Answers

0

The saved function in GAUSS 19 will allow you to save datasets in CSV and XLS/XLSX format. It will detect the file type you wish to create by the file extension of the file name you pass in. For example:

// Simple matrix to save
X = { 1 2 3,
      4 5 6,
      7 8 9 };

// Variable names for file
vnames = "GDP" $| "Imports" $| "Exports";

// Create comma separated data file
// First row will contain variable names
// remaining rows will contain data from 'X'
saved(X, "mydata.csv", vnames);

// Create XLSX dataset
// with A1:C1 containing the variable names
// and A2:C4 containing the data from
// the matrix 'X'
saved(X, "mydata.xlsx", vnames);

will create a file named mydata.csv with these contents:

GDP,Imports,Exports
1,2,3
4,5,6
7,8,9

and create the file mydata.xlsx as described in the comments in the code snippet.

0

Thank you for your prompt answer, but I guess my question is different.

Currently, Gauss has in "File" an easy option for the user to "Import Data". So, since there is no an "Export Data" option that makes easier to export data (or even results) that after importing/loading a data set, I am asking if the very new release (Gauss 19) adds the "Export Data" option.

0

Are you thinking that you would select File > Export Data and then GAUSS would open up a dialog window similar to the File Import window, where you would have the option to select from matrices, arrays, strings, etc in your GAUSS workspace to export to a file?

GAUSS 19 does not have something like this, but it is an interesting idea. I would imagine it would be nice for this dialog to allow you to add multiple different variables into the exported dataset and to be able to specify the header names by either typing them in or selecting them from a string array that is already in GAUSS.

Assuming that my understanding is correct, can you think of any other features that would be helpful for this Data Export Window?

0

Exactly!

Other possible features that occur to me are:

  • selecting a range of observations
  • allow to export the Gauss file to other formats (e.g., SAS, R, and Stata formats) and ODBC data sources in case multiple software are used within and across team projects.

These feature would be also great to have it available when selecting File > Import Data

 

 

 


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy