Skip to content
Prev 361469 / 398506 Next

Application of "merge" and "within"

Thanks so much.. I will try that.. and keep you posted..

on a different note.. using the above examples.. after adding a new column
is blank.. summarizing a null column causes errors.. (like min(NULL) or
min(NA) etc.. to avoid that I was trying the following code..

within(q, as.data.frame(as.matrix(apply($DATA,2,function(x)
{require(gtools);x1 <- ifelse(invalid(x),0,x);return(x1)}))))

For some reason, the above code is not working.. any ideas on converting
NAs/blanks to 0 using apply in within? or any other similar method?

Thanks so much.. I appreciate your help!!

Regards,
Santosh
On Wed, Jun 1, 2016 at 1:45 AM, peter dalgaard <pdalgd at gmail.com> wrote: