Re: [R] Create subset using variable

2012-01-21 Thread pansophy
Sorry Ben. I haven't posted to these forums before and I didn't know what kind of response I would get. -- View this message in context: http://r.789695.n4.nabble.com/Create-subset-using-variable-tp4316812p4317213.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Create subset using variable

2012-01-21 Thread pansophy
For example: # dataset age<-18:29 height<-58:69 df.ex=data.frame(age=age,height=height) df.ex[4,1]<-NA # dataset of columns that will be used for analysis values<-c("age", "height") df.variables=data.frame(values) # Age column has a null (NA) value. The row must be removed for the analysis to

[R] Create subset using variable

2012-01-21 Thread pansophy
I am trying to create a loop that will perform a series of analyses. I am using geeglm from geepack, which fails if there are any null values. Creating a subset solves this, but do not seem to be able to set the subset dynamically based on a changing variable. while (j <= y.num) { strSub