Problem regarding using dataloop

Hi I am trying manipulate a gauss data set using dataloop statement.

I am trying to follow the commands listed in the user guide/help file.

It does not seem to be working. Is thare any additional step that I need to follow in order for the dataloop to work?

Below is my code. I would appreciate your help in this regard.

dataset = "testnout"; //Here testnout is a gauss dataset

dataloop ^dataset datasetV2;

make hhsize2 = 1 + 0;

keep hhsize2;

The error message is saying "Operand missing" and "syntax error" pointing to the line "dataloop ^dataset datasetV2;".

Thanks and Regards.


3 Answers


You need to turn on Dataloop Translation before you can use these commands. From the main GAUSS menu, select Tools->Preferences->Compile Options. Then you will see a checkbox (or radio button depending upon platform) next to "Dataloop Translation". Click this to turn Dataloop Translation on.

You will want to turn it back off when you are not using it.



I was just wondering whether there is any limit on the number of cases and variables that can be used with the dataloop command.

I used it successfully to manipulate a gauss data file of 1000 rows and 6 columns.

But now I have been trying to use it with a gauss data file that has 1506 rows and 12 columns using the following command. But it seems that its been going on forever and gauss is ultimately not responding each time I am trying to run the code.

dataset1 = "DataDUST";

/*Use data loop to get only the rows that are valid*/
dataloop ^dataset1 dataset;
select not((PairID .== 355002) .and (Gender .== 1) .and (Day .== 1));
keep PairID Gender MealDurAtHome MealDurOutHome WorkDurAtHome WorkDurOutHome SocialDurAtHome SocialDurOutHome HHChoresBoth ShoppingBoth LeisureBoth Day;

All that I need to do is to create some new variables and put it back into a gauss data set or delete some rows and create a new data set from the old one.

I would appreciate your help in this regard.

Thanks and Regards




There are not any size limitations to dataloop translations. However, prior to GAUSS 14, dataloop translation did not support variable names greater than 8 characters. This is likely the problem.

I think it will be much simpler for you to simply load the data from the dataset with the GAUSS loadd command, delete rows using logical comparisons (i.e. .<, .==, .>, etc) and the GAUSS delif function, then resave the dataset with saved.

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