search for: myby2

Displaying 1 result from an estimated 1 matches for "myby2".

Did you mean: mybys
2007 Jul 31
1
aggregate.data.frame - prevent conversion to factors? show statistics for NA values of "by" variable?
...matted as "character"? Or do I just need to re-format them once I have my results? mydf=data.frame(testvar1=c(1,3,5,7,8,3,5,NA,4,5,7,9), testvar2=c(11,33,55,77,88,33,55,NA,44,55,77,99) ) str(mydf) # myby1=c('red','blue',1,2,NA,'big',1,2,'red',1,NA,12) myby2=c('wet','dry',99,95,NA,'damp',95,99,'red',99,NA,NA) myby1.new = ifelse(is.na(myby1)==T,"is_na",myby1) myby2.new = ifelse(is.na(myby2)==T,"is_na",myby2) str(myby1.new) str(myby2.new) mybys=data.frame(mbn1=myby1.new,mbn2=myby2.new , stringsAsFact...