Skip to content
Prev 309492 / 398506 Next

HELP!! how to remove 10% of data randomly in R

On Oct 31, 2012, at 5:42 AM, Eugenie wrote:

            
Not clear whether those entries are to be NA or that you wanted a reduced size dataframe. Perhaps:


is.na(dfrm[ sample(1:NROW(dfrm) , c('O3','NO2','sun','temp','wspeed')]) <- TRUE

Note that the spellings of your column names and specified targets are not the same, and so there is a further problem with you problem specification.