On Apr 25, 2012, at 10:57 AM, Carly Huitema wrote:
Hello R-help list,
I would really appreciate help with my factoring problem.
My generated data is this:
df <- expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2))
df$curve <- as.factor(rep(1:6, each=length(seq(10,80, by=5
df$count
try this: (uses 'ave')
> df <- expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2))
> df$curve <- as.factor(rep(1:6, each=length(seq(10,80, by=5
> df$counts <- 3*df$T/df$conc + rnorm(df$T,0,2)
>
> plot(counts~T, df)
> df$zero <- ave(df$counts, df$curve, FUN = function(x) x - min(x))
>
> d
Hello R-help list,
I would really appreciate help with my factoring problem.
My generated data is this:
df <- expand.grid(T=seq(10,80, by=5), conc=rep(c(1, 3, 7), 2))
df$curve <- as.factor(rep(1:6, each=length(seq(10,80, by=5
df$counts <- 3*df$T/df$conc + rnorm(df$T,0,2)
plot(counts~T, df)
3 matches
Mail list logo