[R] Do there need to be the same number of y-values for each x-value when using tapply?

Jenny Liu jenny@liu00 @ending from gm@il@com
Fri Jul 6 16:29:18 CEST 2018


Hi everyone,
I'm trying to fit a set of data to a non-linear distribution (namely, rates of
insect development at different temperatures), and I'm trying to do this using
the selfStart and GetInitial functions. (I'd of course be open to alternative
suggestions!). However, I keep running into this error:

Error in tapply(y, x, mean, na.rm = TRUE) :
arguments must have same length

I created a post on stackoverflow that includes the data and my code, and a
more in-depth explanation. I would be grateful if someone could have a look
and let me know where I'm going wrong!

https://stackoverflow.com/questions/51119314/using-tapply-when-you-have-different-n-for-each-treatment


Thanks very much,
Jenny
	[[alternative HTML version deleted]]



More information about the R-help mailing list