[R] information extraction

Schmitt, Corinna Corinna.Schmitt at igb.fraunhofer.de
Tue Apr 24 10:45:41 CEST 2007

Dear R-experts,

I imported successful a workspace from Matlab. The information is stored
in the variable data. If I use the command "length(data)" I get back a
number which corresponds to the number of variables which were imported.
Here it is 82. Now I only want to know the names of the imported
variables to modify my program. Can anyone help me?

My knowledge which I tested yet to archive the goal:

1. I know that I can extract the information of a variable with the
command "data$staine" for example. Here I need to know the variable name
"staine" coming from Matlab. But what if I do not know it?

2. The command "data[10]" just gives me back the information stored in
the variable no. 10  but I do not know the name.

3. I am not allowed to make changes in the Matlab code because it just a
lizenced program so I need to do it in R. In Matlab I just need to add
the code line "names=evalin('base','who')" and than store the workspace.
I could use the variable name in and extract the names with data$names.

Has anyone an idea?

Thanks, Corinna

More information about the R-help mailing list