Thanks for the tips/adviceI actually used a different solution to
circumvent this, but Uwe's solutions would also work
--
View this message in context:
http://r.789695.n4.nabble.com/Apply-giving-me-errors-tp3923880p3925377.html
Sent from the R help mailing list archive at Nabble.com.
___
On Fri, Oct 21, 2011 at 3:09 AM, kickout wrote:
> So i have a simple function:
>
> bmass=function(y){
> weight=y$WT*y$MSTR
> return(bio)
> }
But this just returns "bio" and since an object with that name is not
defined in the function, it will be looked up in the global
environment (workspace) an
On 21.10.2011 02:09, kickout wrote:
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
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[
4 matches
Mail list logo