Re: [R] how to introduce missing data for complete data

2013-11-11 Thread MacQueen, Don
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

Re: [R] how to introduce missing data for complete data

2013-11-11 Thread Bert Gunter
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

[R] how to introduce missing data for complete data

2013-11-10 Thread dila radi
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