Here's a suggestion.
The sample() function takes random samples of sets. See
?sample
The set you want to take a random sample from is the rows of your data.
Represent the rows by their row numbers.
To get a vector of row numbers, you can use the seq() function. See
?seq
Let's suppose your dat
1. You need to define more explicitly exactly what you mean by "randomly."
2. You need to make an honest effort to learn basic R, e.g. by
spending time with the "Introduction to R" document that ships with R
or an online tutorial (there are many good ones).
Cheers,
Bert
On Sun, Nov 10, 2013 at 1
Hi,
Im new R users. In my research I use rainfall data and Im interested in
estimating missing data. I would like to use Normal Ratio Method to
estimate missing data. My problem is, how do I introduce missing data
randomly within my complete set of data?
Stn ID Year Mth Day Amount
4860
3 matches
Mail list logo