[R] adding a name to cross tab margins

2011-04-15 Thread Dmitry Berman
Listers, I have created a cross-tab matrix using the following code: S <- c(1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,1,2,3,1,1,2,3,1,2,2) F <- c(1,2,3,1,2,3,1,1,1,1,2,3,1,1,3,2,2,2,1,2,3,1,1,1,1,2,3,3,1,3,1,3,1,1,2,3,1,1,3,2,3,2,1,1,1,2,3,1,1,2) table(S,F) f

[R] Correlation Matrix

2011-04-07 Thread Dmitry Berman
Listers, I have a question regarding correlation matrices. It is fairly straight forward to build a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is construct a smaller correlation matrix using just three of the variable out

Re: [R] Matrix Help

2011-02-20 Thread Dmitry Berman
On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman wrote: > Listers, > > I have a simple matrix: > > -- > m <-c(1:7) > m <- cbind(m) > > m > [1,] 1 > [2,] 2 > [3,] 3 > [4,] 4 > [5,] 5 > [6,] 6 > [7,] 7 > -

[R] Matrix Help

2011-02-20 Thread Dmitry Berman
Listers, I have a simple matrix: -- m <-c(1:7) m <- cbind(m) m [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 [7,] 7 --- I want to add a second column using: [[alternative HTML version deleted]] ___

[R] Means

2011-02-18 Thread Dmitry Berman
Listers, Is there a command/function to get the population standard deviation (N) and the sample standard deviation (n-1) Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-