assign subset of parent table to objects in R

Posted by Brandon on Stack Overflow See other posts from Stack Overflow or by Brandon
Published on 2010-05-24T19:15:44Z Indexed on 2010/05/24 19:21 UTC
Read the original article Hit count: 388

Filed under:

Hello, I would like to iterate through a table and break it into relvant parts based on the number of visits. I have tried several things but cannot seem to get it to work.

I have included the code.

for(i in 1:6){ paste("testing.visit",i,"\n",sep="") <- subset(testing,visit_no==2) }

But I get the following error.

Error in paste("testing.visit", i, "\n", sep = "") <- subset(testing, : target of assignment expands to non-language object

Thank you,

Brandon

© Stack Overflow or respective owner

Related posts about r