Displaying 1 result from an estimated 1 matches for "sample42".
Did you mean:
sample2
2012 Jun 14
1
Question about sampling
...encies.
Essentially i have a matrix of 200 rows (df) like this
Name,Condition,rs1385699_X,rs6625163_X,rs962458_X,Rs4658627_1,
sample01,Case,1,1,1,-1
sample02,Control,1,1,1,1
sample06,Control,1,-1,1,0
sample10,Case,1,1,1,0
sample11,Control,1,1,1,1
sample24,Control,-1,-1,1,0
sample29,Control,1,-1,1,0
sample42,Case,-1,-1,1,0
sample64,Case,-1,1,1,0
....
I'm interested to mantain in my subsample the same frequencies of those
observed for the 1 value in each column
I approached the problem with sample() function
mysample<-df[sample(1:nrow(df),100,replace=F),]
Then I tested that the frequencies of e...