This post breaks the posting guide in multiple ways. Please read it again
(and then again) - in particular the first 3 paragraphs. You will help
yourself by following it.
The solution is right there in the help page for ?data.frame and other
places including Introduction to R. I think its mo
OK, I got it figured out. I was not keying into a length greater than 1, so:
# I added this object and placed it into the iftelse statement:
lid <- sum(match(id, st[i], nomatch = 0))
out$var.g[i]<-ifelse(lid ==1, meta$var.g[id==st[i]],
aggs(g=g[id==st[i]],
Hi All,
I am using a specialized aggregation function to reduce a dataset with
multiple rows per id down to 1 row per id. My function work perfect when
there are >1 id but alters the 'var.g' in undesirable ways when this
condition is not met, Therefore, I have been trying ifthen() statements to
ke
3 matches
Mail list logo