Displaying 3 results from an estimated 3 matches for "csmeredith".
2012 Sep 12
3
how to create a substraction matrix (subtract a row of every column from the same row in other columns)
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-x1 x3-x1 x4-x1 x5-x1
x2 x3-x2 x4-x2 x5-x2
x3 x4-x3 x5-x3
x4 x5-x4
x5
Then I
2012 Oct 30
2
help with for loop: new column giving count of observation for each SITEID
Hello,
I think this is easy, but I can't seem to find a good way to do this in the R help. I have a list of sites, with multiple years of data for each site id. I want to create a new column that gives a number describing whether it is the 1st year ("1" ) the data was collected for the site, the second year ("2"), etc. I have different years for each siteid, but I don't
2012 Oct 24
1
randomly select another observation with same grouping factor and year value, do for every record in dataframe
Hello,
I am trying to create a function that will move through each record of a data frame, find the value in the "HUC" column, then
randomly select another observation from the dataframe with the same value in "HUC" column, as well as the same value in "Yr" column as the first observation. I want the function to produce a list of the RchID of the first observation,