Re: [R] help appending randomly selected observation based on criteria

2012-10-25 Thread csmeredith
Hello, I wrote a request yesterday on how to select a random observation that met certain criteria. I think mostly I have it figured out, but I can't figure out how to append the observations. The output just has one observation in it. Any help would be appreciated, thanks. Christy setwd ("C:

[R] how to create a substraction matrix (subtract a row of every column from the same row in other columns)

2012-09-12 Thread csmeredith
Hello I have data like this x1 x2 x3 x4 x5 I want to create a matrix similar to a correlation matrix, but with the difference between the two values, like this x1 x2 x3 x4 x5 x1 x2-x1x3-x1 x4-x1 x5-x1 x2 x3-x2 x4-x2 x5-x2 x3