View source: R/detect_outliers.R
detect_outliers | R Documentation |
Detect outlier values by country.
detect_outliers(df, var = "value", alpha = 0.05)
df |
data.frame: A |
var |
character: Column to use for outlier detection. Defaults to "value". |
alpha |
numeric: Significance level for a two-tailed test. Defaults to 0.05. |
tibble
# Fetch source data
df <- fetch_indicator('SH.MED.PHYS.ZS', source = 'who')
# Detect outliers (alpha = 0.05)
df2 <- detect_outliers(df)
df2[df2$outlier,]
# Detect outliers (alpha = 0.01)
df3 <- detect_outliers(df, alpha = 0.01)
df3[df3$outlier,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.