[R] Help : delete at random

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Mar 1 15:30:01 CET 2005


Caroline TRUNTZER wrote:
> Hello
> I would like to delete some values at random in a data frame. Does
> anyone know how I could do?

What about sample()-ing (if I understand "at random" correctly) a 
certain number of values from 1:nrow(data) and using the result as 
negative index the data.frame?

Uwe Ligges


> With best regards
> Caroline
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list