search for: tp24199695p24200736

Displaying 1 result from an estimated 1 matches for "tp24199695p24200736".

2009 Jun 25
2
random sampling or random replacement
Dear R users, I'm trying to randomly recreate a real dataset with missing data and I'm not quite sure if I can use the sample command for this. I think it might be better to do it in 2 steps and randomly replace the sampled data with missing data... So something like this x <- sample(10000:20000, 100) #without replacement Now I want x to contain to 20% missing data (NA). Could