search for: davidneu

Displaying 6 results from an estimated 6 matches for "davidneu".

Did you mean: davide
2010 Jul 12
1
Matrix Column Names
Hi, Is there a way to create a matrix in which the column names are not checked to see if they are valid variable names? I'm looking something similar to the check.names argument to data.frame. If so, would such an approach work for the sparse matrix classes in the Matrix package. Many thanks! Cheers, Dave
2010 May 22
2
Fast Matrix Computation
Hi, I have two (large) matrices A and B of dimensions (m,n) and (p,n) respectively. I'd like to see if the is a fast way to compute a new matrix C with dimension (m*p,n) in which each row in C is found by applying some function f to each pair of rows (x,y) where x is a row in A and y is a row in B. For example, if A <- matrix(c(1, 2, 3, 4, 5, 6), byrow=TRUE, ncol=3) B <- matrix(c(7,
2010 Feb 06
4
Sorting
Hi, I have a list of vectors (of varying lengths). I'd like to sort this list by applying a function to each pair of vectors in the list and returning information to sorting routine that let's it know which one is larger. To solve problems like this in Common Lisp, the sort function accepts a function as an argument. The arguments to this function are two elements of the list which is
2010 Feb 16
0
tm package
Hi, I'm using version 0.5.1 of tm package with R 2.10.1. It looks to me as if after the following reuters21578 <- Corpus(DirSource(corpusDir), readerControl = list(reader = readReut21578XMLasPlain)) reuters21578 <- tm_map(reuters21578, stripWhitespace) reuters21578 <- tm_map(reuters21578, tolower) reuters21578 <- tm_map(reuters21578, removePunctuation)
2011 Apr 23
1
Vertical bwplot and stripplot
Hi, I'd like to change the default orientation of bwplot() and stripplot() so the plots are displayed vertically. Passing horizontal=FALSE into stripplot in the simple code below doesn't seem to be the answer. library(lattice); x <- rnorm(100); y <- as.factor(sapply(1:100, function(k) sample(c("A","B","C"), 1, prob=c(1/2, 1/3, 1/6)))); my.df <-
2011 Apr 23
1
Arguments to order()
Hi, The rows of a data frame can be sorted lexicographically as shown in this example, my.df <- data.frame(x=c(1,1,1,2,2), y=c(1,2,3,2,1)) my.df[order(my.df$x,my.df$y, decreasing=TRUE), ] however, I'm wondering if it's possible to pass a variable in as the first argument to order() so that the actual set of columns used in the sort can be easily varied? FWIW, the first argument to