search for: onerow

Displaying 5 results from an estimated 5 matches for "onerow".

2010 May 14
1
debugging substitute function in R 2.11
...;ve tried to debug it myself, but unfortunately my knowledge of R is not deep enough to find a compatible version of the function with R 2.11 yet. Here is the ll () function: ****** ll <- function() { df <- NULL envir <- parent.frame () for (member in ls (envir = envir)) { oneRow <- list (member = member) for (property in c ("class", "mode", "dim", "length")) { value <- eval (substitute ( # this is the call producing the error in R 2.11 {...
2004 Dec 20
1
faster row by row data frame processing
...2.0.0.) Thank you, b. #all is the original data frame (date + a number of columns) #set up the output data frame DailyTopN <- data.frame(all[1,1],matrix(ncol=ncol(all)-1)) names(DailyTopN) <- names(all) top <- 20 for (i in 1:1000) #the rows to be processed { #data frame row as vector onerow <- na.omit(as.matrix(all[i,][2:ncol(all)])[1, ]) #select the 'top' highest absolute values r <- rank(abs(onerow),ties.method="random") selected <- names(r[which(r <= top)]) #set +/-1 for the highest absolute values, 0 for the others DailyTopN[i,selected] <- 1 *...
2009 Mar 15
1
cbind(NULL,zoo.object)?
Folks, I often build up R objects starting from NULL and then repeatedly using rbind() or cbind(). This yields code like: a <- NULL for () { onerow <- craft one more row a <- rbind(a, onerow) } This works because rbind() and cbind() are forgiving when presented with a NULL arg: they act like nothing happened, and you get all.equal(x,rbind(NULL,x)) or all.equal(x,cbind(NULL,x)). This same idea is useful in building up a zoo matrix, by...
2011 Jan 25
2
FW: question about the pt() calculation
From: Leitch, Matthew C. Sent: Monday, January 24, 2011 6:53 PM To: 'info at network-theory.co.uk' Subject: question about the pt() calculation Hello Thank you for your time. I am a graduate student at the University of Texas Medical Branch, and I was wondering if you could help me with a R program I am writing. I have some data that is stored a file that has 1733 rows and 4 columns.
2010 Aug 11
3
Running something without a loop when the result from the previous iteration is require for the current iteration
Hello Everyone! Here's what I'm trying to do. I'm working on generating occurrences of precipitation based upon precipitation occurrence for a station during the previous day and two stations that have already been generated by joint probablities and 1st order Markov chains or by the same generation process. This has to be done for each remaining stations for each month. > genmat