-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
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
Quatargo exercise - modify existing package - Zoltan #8
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8 +/- ##
=========================================
Coverage ? 18.18%
=========================================
Files ? 3
Lines ? 11
Branches ? 0
=========================================
Hits ? 2
Misses ? 9
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Just found some minor issues regarding the function descriptions and edge cases in the windsorize function.
@@ -1 +1,2 @@ | |||
exportPattern("^[[:alpha:]]+") | |||
importFrom("stats", "quantile") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why haven't you used the package roxygen2 to generate the NAMESPACE file?
@@ -1,4 +1,6 @@ | |||
#' Meanimputation | |||
#' @param x A vector. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Longer description missing.
@@ -0,0 +1,16 @@ | |||
#' Transform_log | |||
#' | |||
#' Log transformation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description could be longer here.
#' | ||
#' Do some windsorization. | ||
#' | ||
#' Winsorizing or winsorization is the transformation of statistics by limiting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice description! Just missing how input parameter p
influences the result
q <- quantile(x, p) | ||
x[x >= q] <- q | ||
if(all(is.na(x))) {stop("argument should not be a vector containing only NA-s or NULL-s")} | ||
q_up <- quantile(x, 0.5 + p / 2 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to consider the following situations:
- What happens if
x
contains someNA
values? - What happens if
x
is an empty/NULL vector?
No description provided.