Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2742 +/- ##
==========================================
+ Coverage 93.43% 93.44% +<.01%
==========================================
Files 61 61
Lines 12298 12314 +16
==========================================
+ Hits 11491 11507 +16
Misses 807 807
Continue to review full report at Codecov.
|
| tt = grep("^ +$", na.strings) | ||
| if (length(tt)) { | ||
| warning('na.strings contains some blank strings. They have been removed. strip.white=TRUE (default) together with na.strings="" turns any number of spaces into NA in string columns') | ||
| na.strings = na.strings[-tt] |
Member
There was a problem hiding this comment.
Should this be
tt = grep("^\\s+$", na.strings)
if (strip.white && length(tt)) {
warning('na.strings contains strings consisting only of whitespace, yet strip.white=TRUE. These will be ignored: strip.white=TRUE (default) together with na.strings="" turns any number of spaces into NA in string columns'.)
}i.e. not just repeated spaces and not 'blank' strings but 'whitespace-only' strings.
Member
Author
There was a problem hiding this comment.
Well spotted. Yes, will do.
| na.strings = na.strings[-tt] | ||
| } | ||
| tt = which(substring(na.strings,1L,1L)==" " || substring(na.strings, nn<-nchar(na.strings), nn)==" ") | ||
| if (length(tt)) { |
Member
There was a problem hiding this comment.
| not || I think. Or alternatively,
if (any(substring(na.strings,1L,1L)==" ") || any(substring(na.strings, nn<-nchar(na.strings), nn)==" ")) {
Member
Author
There was a problem hiding this comment.
Well spotted. Thanks, will do.
st-pasha
approved these changes
Apr 13, 2018
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.
Closes #2735
Closes #2697