[R] Random number quality

2010-02-05 Thread b k
Hello, I'm running R 2.10.1 on Windows Vista. I'm selecting a random sample of several hundred items out of a larger population of several thousand. I realize there is srswor() in package sampling for exactly this purpose, but as far as I can tell it uses the native PRNG which may or may not be ra

[R] Factor contingency tables

2010-01-21 Thread b k
Hello, I know there must be a simple soluton to this problem but it eludes me currently. My data is partitioned into two subsets, each subset has a common column factor but with varying levels: levels(fdf_ghc$AgeDemo) [1] "26TO35" "36TO45" "46TO55" "56TO65" "66TO75" "76TO85" levels(fdf_ghcnull$A

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
On Mon, Jan 18, 2010 at 10:33 AM, Ivan Calandra < ivan.calan...@uni-hamburg.de> wrote: > I didn't understand from the help what really does the function rowMeans > but it looks like it doesn't take into account the categorical variables (I > want to calculate the means when the values of all categ

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
On Mon, Jan 18, 2010 at 10:17 AM, Ivan Calandra < ivan.calan...@uni-hamburg.de> wrote: > Thanks for your answer, but it doesn't work... > > Here is what I get: > > ssfamean <- aggregate(ssfa[[10:24]],ssfa[c("SPECSHOR", "BONE", "TO_POS", > "FACETTE", "SHEARFAC", "ENA_BA")],mean) > Error in .subset2

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
On Mon, Jan 18, 2010 at 9:53 AM, Ivan Calandra wrote: > Hi everybody! > > I'm working on R today so I have a lot of questions (you may have > noticed that it's the 3rd email today). I'm new on R, so please excuse > the "spam"! > > I have a dataset "ssfa" with many rows and the column names are: >