Learn R Programming

geosimilarity (version 3.8)

removeoutlier: removing outliers.

Description

Function for removing outliers.

Usage

removeoutlier(x, coef = 2.5)

Value

Location of outliers in the vector

Arguments

x

A vector of a variable

coef

A number of the times of standard deviation. Default is 2.5.

Examples

Run this code
data("zn")
# log-transformation
hist(zn$Zn)
zn$Zn <- log(zn$Zn)
hist(zn$Zn)
# remove outliers
k <- removeoutlier(zn$Zn, coef = 2.5)
k

Run the code above in your browser using DataLab