search for: i_a

Displaying 4 results from an estimated 4 matches for "i_a".

Did you mean: _a
2013 Mar 02
3
if value is in vector, perform this function
...ng sequence - every "3.5 days" feed_days = seq(1,60,by=3.5) Daphnia <- function(t,x,params){ C_D = x[2]; C_A = 0; for(t %in% feed_days){ if t == TRUE { C_A = 1.5 } else{ C_A = 0 }} gamma = params[1]; m_D = params[2]; K_q = params[3]; q_max = params[4]; M_D = m_D * C_D I_A = (C_D * q_max * C_A) / (K_q + C_A) r_D = gamma * I_A return( list(c( - I_A, r_D - M_D ))) } library(deSolve) results <- ode(init, t, Daphnia, params, method = "lsoda") Let me know if there's any other info that would be helpful and thanks very much for your help! [[a...
2009 Nov 22
1
How to make a matrix of a number of factors?
I use the following code to generate a matrix of factors. I'm wondering if there is a way to make it more general so that I can have any number of factors (not necessarily 5). a=3 b=4 c=5 d=6 e=7 A=1:a B=1:b C=1:c D=1:d E=1:e X=matrix(nr=a*b*c*d*e,nc=5) for(i_a in 1:a-1) { for(i_b in 1:b-1) { for(i_c in 1:c-1) { for(i_d in 1:d-1) { for(i_e in 1:e-1) { X[(((i_a * b + i_b) * c + i_c) * d + i_d) * e + i_e + 1, ] = c(i_a+1, i_b+1, i_c+1, i_d+1, i_e+1) } } } } } print(X)
2010 Feb 09
1
"1 observation deleted due to missingness" from summary() on the result of aov()
...24 19.849 0.82705 0.9589 0.52442 Residuals 119 102.642 0.86254 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 1 observation deleted due to missingness ####################### a=3 b=4 c=5 A=1:a B=1:b C=1:c n=3 X=matrix(nr=a*b*c*n,nc=n) colnames(X)=LETTERS[1:n] for(i_a in 1:a-1) { for(i_b in 1:b-1) { for(i_c in 1:c-1) { for(i_n in 1:n-1) { X[((i_a * b + i_b) * c + i_c) * n + i_n + 1, ] = c(i_a+1, i_b+1, i_c+1) } } } } set.seed(0) Y=matrix(nr=a*b*c*n,nc=1) for(i in 1:(a*b*c)) { for(i_n in 1:n-1) { fa=X[i,'A'] fb=X...
2009 Nov 22
1
Why F value and Pr are not show in summary() of an aov() result?
...ave the following code. I'm wondering why summary() doesn't show F value and Pr? Rscript multi_factor.R > a=3 > b=4 > c=5 > d=6 > e=7 > > A=1:a > B=1:b > C=1:c > D=1:d > E=1:e > > X=matrix(nr=a*b*c*d*e,nc=5) > colnames(X)=LETTERS[1:5] > > for(i_a in 1:a-1) { + for(i_b in 1:b-1) { + for(i_c in 1:c-1) { + for(i_d in 1:d-1) { + for(i_e in 1:e-1) { + X[(((i_a * b + i_b) * c + i_c) * d + i_d) * e + i_e + 1, ] = c(i_a+1, i_b+1, i_c+1, i_d+1, i_e+1) + } + } + } + } + } > > Y=matrix(nr=a*b*c*d...