Open
Conversation
Adding feature to enable changing of the flat's filename. Addressing issue @31 "export with a diferent file name daattali#31"
added changes suggested by daattali in previous pull request
daattali
reviewed
Aug 4, 2019
R/shinyform.R
Outdated
| ), | ||
| ".csv" | ||
| ) | ||
| if (!is.null(storage$filename)) { |
Owner
There was a problem hiding this comment.
It's more readable to start with the is.null() case rather than the !is.null(), it's just easier on the brain to do positives than negatives. And since the if statement is really just determining the base filename (not the extension), it's a bit simpler to do this:
if (is.null(...) {
filename <- paste(...)
} else {
filename <- storage$filename
}
filename <- paste0(filename, ".csv")
Contributor
Author
There was a problem hiding this comment.
thanks for the feedback
Owner
|
Please always test every line of code that gets modified. Even very small and innocent-looking changes must be tested before committing. The variables |
Added test file for testsavedataflatfile function to run unit tests on the function (all passed) and re-ran devtool::test() and devtool::document()
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.
Commit to address Issues: #26 - added feature to saveDataFlatfile function for #31