Displaying 1 result from an estimated 1 matches for "nofrow".
Did you mean:
nobrow
2008 Jun 19
2
Create Matrix from Loop of Vectors, Sort It and Pick Top-K
...rt that array. But I am stuck at the step (b).
Can anybody suggest what's the best way to achieve
my aim above?
This is the sample code I have so far (not working).
__BEGIN__
#data <- read.table("testdata.txt")
# Is this a right way to initialize?
all.arr = NULL
for (gi in 1:nofrow) {
gex <- as.vector(data.matrix(data[gi,],rownames.force=FALSE))
#compute variance
gexvar <- var(gex)
# join variance with its original vector
nvec <- c(gexvar,gex)
# I'm stuck here.....This doesn't seem to work
all.arr <- data.frame(nvec)
}
print(all.ar...