Skip to content

Conversation

@jeetendersinghc
Copy link
Collaborator

No description provided.

function(s, u) {
t <- as.vector(summary(s[[y]]))
vals <- stats::quantile(s[[y]],
probs = c(0, 0.25, 0.5, 0.75, 1),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jeetendersinghc , it looks great. Could you also add one more argument for user to define the type and set default as 2?

upper_outliers <- t[5] + iqr.range * 1.5
lower_outliers <- t[2] - iqr.range * 1.5
s$outlier <- ifelse((s[[y]] > upper_outliers | s[[y]] < lower_outliers), s[[y]], NA)
iqr.range <- vals[4] - vals[2] # Q3 - Q1 (type=2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any difference to calculate outlier between different type?

@wangben718 wangben718 merged commit 58842de into main Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants