Fixing all the Critical Points of datacleaner package for Quantargo training session.#4
Open
nandakallugjeri wants to merge 6 commits intoquantargo:masterfrom
Open
Fixing all the Critical Points of datacleaner package for Quantargo training session.#4nandakallugjeri wants to merge 6 commits intoquantargo:masterfrom
nandakallugjeri wants to merge 6 commits intoquantargo:masterfrom
Conversation
mannau
requested changes
May 7, 2019
Member
mannau
left a comment
There was a problem hiding this comment.
Excellent!
Just spotted a few minor issues.
| @@ -1,4 +1,8 @@ | |||
| #' Meanimputation | |||
| #' | |||
| #' Removes NA-s with the mean value for the vector \code{x} | |||
| @@ -1 +1,2 @@ | |||
| exportPattern("^[[:alpha:]]+") | |||
| importFrom("stats", "quantile") No newline at end of file | |||
Member
There was a problem hiding this comment.
Have you used roxygen2 to generate the NAMESPACE file?
| #' Windsorize | ||
| #' | ||
| #' Do some windsorization. | ||
| #' Replacing values of vector \code{x} greater or smaller then \code{q} quantile values. |
| q <- quantile(x, p) | ||
| x[x >= q] <- q | ||
| if(length(x) == 0) stop('Empty vector passed as an argument.') | ||
| if( sum(is.na(x)) == length(x) ) stop('A vector of NA-s passed as an argument') |
Member
There was a problem hiding this comment.
More explicit to use if (all(is.na(x))) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
datacleaner package modified to fix all the critical points, mentioned in the last session of Quantargo's Data Science in Teams module, for the Preparation phase. Tests with testhat not included. #3