We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hai_kurtosis_vec <- function(.x){ # Tidyeval ---- x_term <- .x # Checks ---- if(!is.numeric(x_term)){ stop(call. = FALSE, ".x must be a numeric vector.") } # Calculate n <- length(x_term) mu <- mean(x_term, na.rm = TRUE) n_diff <- (x_term - mu)^4 nu <- (1/n * sum(n_diff)) d_diff <- (x_term - mu)^2 de <- (1/n * sum(d_diff))^2 k <- nu/de return(k) print(k) } hai_skewness_vec <- function(.x){ # Tidyeval ---- x_term <- .x # Checks ---- if(!is.numeric(x_term)){ stop(call. = FALSE, ".x must be a numeric vector.") } # Calculate n <- length(x_term) mu <- mean(x_term, na.rm = TRUE) n_diff <- (x_term - mu)^3 nu <- (1/n * sum(n_diff)) d_diff <- (x_term - mu)^2 de <- (1/n * sum(d_diff))^(3/2) s <- nu/de return(s) print(s) }
The text was updated successfully, but these errors were encountered:
Use this link for the formula
https://www.geeksforgeeks.org/skewness-and-kurtosis-in-r-programming/
Sorry, something went wrong.
69f0cb8
Merge pull request #134 from spsanderson/development
ad627d9
Fixes #132
spsanderson
No branches or pull requests
The text was updated successfully, but these errors were encountered: