[R] how to remove outliers
gunter.berton at gene.com
Tue Jul 15 12:38:18 CEST 2014
No! Do not do this.
First, the syntax is wrong. Second, this will fail in general due to
floating point arithmetic. Use inequality with sufficient fuzz
time <- time[time$TimeDiff < 14478,]
Moral: Caveat Emptor. Free advice may be worth exactly that.
Genentech Nonclinical Biostatistics
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
On Mon, Jul 14, 2014 at 9:43 PM, Hasan Diwan <hasan.diwan at gmail.com> wrote:
> To remove a row from your data frame, use:
> value <- 14478.4
> time <- time[-time[$TimeDiff] == value,]
> I hope that helps... If not, do push back. -- H
> On 14 July 2014 09:17, Marta valdes lopez <martavaldes85 at gmail.com> wrote:
>> I did this test and I got this outlier that i would like to remove the
>> whole row in my database; anyone knows how i can remove it?
>> chi-squared test for outlier
>> data: time$TimeDiff
>> X-squared = 73260.07, p-value < 2.2e-16
>> alternative hypothesis: highest value 14478.4 is an outlier
>> Thank you!!
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> Sent from my mobile device
> Envoyé de mon portable
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help