[R] replacing empty cells, and Date question

2011-06-23 Thread Keun-Hyung Choi
Hello, I have a data set like one below. First, I'd like to replace the empty cells with NA, and then the one immediately above. I could replace NAs with the immediate one, but don't know for the empty cells. index <- which(is.na(data1$year)) while (any(index)) { dummy$data1[index] <

[R] subsetting data points within confidence limit

2010-08-12 Thread Keun-Hyung Choi
Dear R-list Suppose I have a data set stored in hmet, for which I did get confidence limit on a linear regression as shown below. My question is how I can subset only data points which are within the confidence limit. Thank you. Keun-Hyung ---

[R] row sum question

2008-12-22 Thread Keun-Hyung Choi
Dear helpers, I'm using R version 2.8.0. Suppose that I have a small data set like below. [,1] [,2] [,3] [,4] a1100 b0110 c1110 d0111 First, I'd like to find row sum of values uniquely present in each row, but only sequen