I would like to create variables with a plugin, wich imports a database table. I am using the following code to do this:
SF_macro_save("_vars", "var1 var2...");
SF_macro_save("_types", "type1 type2...");
SF_macro_save("_formats", "format1 format2...");
SF_macro_save("_obs", "obs1 obs2...");
This creates the variables well, but I don't know how to give labels to variables, or to values.
Which C++ function do I need to use to create labels? Or how can I call Stata functions from C++? (I am using Visual Studio 10 if it counts)
I would like to call this Stata functions from the plugin:
label variable var1 label1
and
label define var1_label 1 "label1" 2 "label2" label values var1 var1_label
Thanks