[BioC] object programming problem

Ian Jeffery ian.jeffery at ucd.ie
Tue Mar 1 14:32:49 CET 2005


Hi,

    I have a programming problem that I have ran into once or twice before
Using the command ls returns the names of the files in the active R
environment. I need to use the data contained in these files but ls() only
returns the names of the files. I'm wondering if there is a function that
can be used to access the data?
An example of the problem is as follows.

> ag<-1:10
> bu<-c('h','e','l','p')
> Ci<-ag
> length(ag)
[1] 10
> length(ls()[1])
[1] 1
> ls()[1]
[1] "ag"

The length of ag is 10 but the length of its name is 1. How do I get the
length command to look at the data instead of the name?

Thanks
     Ian



More information about the Bioconductor mailing list