search for: yldbu

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

Did you mean: ylab
2011 Oct 21
2
'Apply' giving me errors
So i have a simple function: bmass=function(y){ weight=y$WT*y$MSTR return(bio) } And want to apply to a whole bunch of rows in my data.frame: final1=apply(final,1,yldbu) BUT...recieve the following error: "Error in y$WT : $ operator is invalid for atomic vectors" However when i try: > final[1,]$WT*final[1,]$MSTR [1] 156.3 It gives me the correct answer....what is apply not liking in my code? Thanks -- View this message in context: http://r.7...