Displaying 2 results from an estimated 2 matches for "throwout".
2007 Mar 01
1
problem with throwing lines out of matrix
Dear all,
again i have a problem with special case of dropping lines out of a
matrix.
i tried the following, where throwout is a vector of length 18 with
simple id values that should be compared to any
for (k in 1:length(throwout))
{
mymatrix=matrix(mymatrix[-(forfact[k]),],ncol=4)
}
this didnt work and i tried the following to find the error:
mymatrix[,1][mymatrix[,1]==throwout[7]]
this returned me a nice value...
2011 Oct 17
1
calculating ratios from all combinations
so here is the code I need help to fix the line for 'st' when it reaches
maximum, that's where i am getting stuck.
thanks
Sharad
set.seed(100)
d=data.frame(x=rnorm(20)+5,
x1=rnorm(20)+5,
x2=rnorm(20)+5,
x3=rnorm(20)+5,
x4=rnorm(20)+5,
x5=rnorm(20)+5,
x6=rnorm(20)+5,
x7=rnorm(20)+5,
x8=rnorm(20)+5)
r2=c()
cinit=0
for (col in 1:9)
{
cinit=cinit+1
st=cinit+1