Re: [R] Operating on count lists of non-equal lengths

2011-01-09 Thread Kari Manninen
Dear Dennis, Thank you so very much for your quick reply. What an introduction to R-help!! Especially I appreciated the time you put to explain the code privately. After a few hick-ups I got it working on my data as well. Regards, - Kari Quoting Dennis Murphy : Hi: This is an abridged v

Re: [R] Operating on count lists of non-equal lengths

2011-01-09 Thread Dennis Murphy
Hi: This is an abridged version of the reply I sent privately to the OP. Generate an artificial data frame # function to randomly generate one of the Q* columns with length 1000 mysamp <- function() sample(c(-1, 0, 1, NA), 1000, prob = c(0.35, 0.2, 0.4, 0.05), replace = TRUE) # use above fu

[R] Operating on count lists of non-equal lengths

2011-01-08 Thread Kari Manninen
This is my first post to R-help and I look forward receiving some advice for a novice like me... I’ve got a simple repeated (4 periods so far) 10-question survey data that is very easy to work on Excel. However, I’d like to move the compilation to R but I’m having some trouble operating on