[R] Array Manipulation
cdsmith@ksu.edu
cdsmith at ksu.edu
Thu Jan 27 20:30:36 CET 2005
I have a data set that looks like the following:
ID Responce
1 57
1 63
1 49
2 31
2 45
2 67
2 91
3 56
3 43
4 23
4 51
4 61
4 76
4 68
5 34
5 35
5 45
I used sample(unique(ID)) to select a sample if ID's, say, (1,4,5). Now
I want to pull out the rows with ID's 1, 4, and 5. I've tried forceing
the matrix into a vector but it does not create and appropriate vector.
I've also tried the if statment but it didn't work right either. Any
suggestions?
More information about the R-help
mailing list