Hi Rosa, Your data never seem to get through. Nevertheless, here is a suggestion:
rodat<-data.frame(id=1:20,age=sample(c("10-20","21-30","31-40"),20,TRUE), weight=c(sample(40:70,18),110,120)) robp<-boxplot(weight~age,rodat) rodat$id[which(rodat$weight %in% robp$out)] Jim On Mon, Sep 5, 2016 at 9:38 PM, Rosa Oliveira <rosit...@gmail.com> wrote: > Dear all, > > I have searched all over and didn´t found an answer :( > > I need urgently to "extract" de identification of the weight outliers of > the participants of a study. > > So, I have a data base with several variables: > id > weight > are 2 off them. > > So, I've done a boxplot and found the weight have outliers. Now I need to > identify the id's of those participants. > I can get the outliers values, nonetheless lots os them are not correct for > some vriables. > > Can you please help me? > > boxplot(WEIGHT~AGE,baseR,range=3) #print WEIGHT boxplot > boxplot(WEIGHT~AGE==1,,baseR,range=3, plot=FALSE)$out # find outliers > values to age 1 (example) > > > I attach the data. > > Best, > Rosa Oliveira > > __________________________________ > > Antes de imprimir este e-mail pense bem se tem mesmo que o fazer. > Há cada vez menos árvores. > Não imprima, pense na sua responsabilidade e compromisso com o MEIO > AMBIENTE! > <http://pt.dreamstime.com/cora-ccedil-atildeo-criado-das-folhas-de-aacutervores-diferentes-thumb12275776.jpg> > <http://pt.dreamstime.com/cora-ccedil-atildeo-criado-das-folhas-de-aacutervores-diferentes-thumb12275776.jpg> > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.