Skip to content
Prev 131327 / 398502 Next

newbie lapply question

On Wed, 5 Dec 2007, Ranjan Bagchi wrote:

            
Did you not read the help page?:

Arguments:

        X: a vector (atomic or list) or an expressions vector.  Other
           objects (including classed objects) will be coerced by
           'as.list'.

and
[[1]]
[1] 13514

BTW, the c() is redundant here: you are concatenating one item only.

As to why as.list() removes the class, read its help page which tells you.

Perhaps if you told us what you are trying to achieve we might be able to 
help you achieve it.