forked from wch/r-source
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default value of type is a vector but implementation assumes a single character values. This is very confusing from an interface perspective. Proposing to change the default arg to one character value instead.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
# A copy of the GNU General Public License is available at | ||
# http://www.r-project.org/Licenses/ | ||
|
||
sink <- function(file=NULL, append = FALSE, type = c("output", "message"), | ||
sink <- function(file=NULL, append = FALSE, type = "output", | ||
split=FALSE) | ||
{ | ||
type <- match.arg(type) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
hhamid
via email
Author
Owner
|
||
|
For this to work, it's be required that the default value of
type
is indeedc("output", "message")
as in the code -- see?match.arg
. You will find this pattern in many other functions.