Dear R-Experts, I just imported a workspace from Matlab. I know that I can get the names of the imported variables with names(). It works. The variable "ca" consists of several elements. I want to get the names of the elements to handle my output better. But names(ca) doesn't work. Why? I did the following commands:> class(ca)[1] "array"> mode(ca)[1] "list"> dim(ca)[1] 66 1 1> length(ca)[1] 66 How can I now get the names which are stored in ca? When I use the command "ca[18]" I receive the content which stands there but not the name collables which I wanted to extract. Any ideas? Thanks, Corinna -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Try the following and look at what they return: str(ca) dimnames(ca) -- Tony Plate laptopcss at gmx.de wrote:> Dear R-Experts, > > I just imported a workspace from Matlab. I know that I can get the names of the imported variables with names(). It works. The variable "ca" consists of several elements. I want to get the names of the elements to handle my output better. But names(ca) doesn't work. Why? I did the following commands: > >> class(ca) > [1] "array" >> mode(ca) > [1] "list" >> dim(ca) > [1] 66 1 1 >> length(ca) > [1] 66 > > How can I now get the names which are stored in ca? When I use the command "ca[18]" I receive the content which stands there but not the name collables which I wanted to extract. > > Any ideas? > > Thanks, Corinna