[R] Check for is.object

Santosh Srinivas santosh.srinivas at gmail.com
Mon Nov 22 16:14:51 CET 2010


Hello,

I am trying to recursively append some data from multiple files into a
common object

For this, I am using in a loop

NewObject <- rbind(NewObject,tempObject)


For the first loop, obviously there is no NewObject ... so I wanted to do
NewObject <- tempObject[0,]

Now when it loops again I want to put the statement do "NewObject <-
tempObject[0,]" inside a if statement ... so that it does I can skip it once
NewObject has been initialized.

But, is.object doesn't seem to work. 

What is the alternative check that I can do? And is there a better way to
achieve what I want?

Thanks,
S



More information about the R-help mailing list