Code:
program load_dataset
syntax anything [, keep_list(varlist)] use "`anything'" if !missing("`keep_list'") {
[INDENT=2]keep `keep_list'[/INDENT]
}
end
Code:
load_dataset $sample_data, keep_list(year family income)
"no variables defined" (error in option keep_list())
I suspect it is because these variables do no yet exist, which they of course won't until I load the data set. Is there something I am missing? Or do I have to solve it in some other way, for example passing the varlist as a string instead?
0 Response to Custome made program that loads dataset and keeps variables give "nor variables defined" error
Post a Comment