You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And should we try to handle conversion? My instinct is no - deciding how to format the printing of an object should be left to the user, this package should just handle moving that text to the clipboard.
The text was updated successfully, but these errors were encountered:
It could warn "not a character vector, coercing to one"... but I think a clipboard handler should be quiet.
Here for example users are forced to write 'glue code', writeClipboard( as.character(x) ) when they clearly just mean writeClipboard(x). Warning might be annoying.
I think it should assume* what's passed in is either already a 1-tuple character vector, or ready to be as.character'd and paste0(collapse = sep)'d into that format [as discussed]
It would always be converted to a string by writeChar upon writing to the connection, so doing that explicitly is fine.
I made a new file, flat_str.R, defining a helper called by each of the OS-specific write_clip functions with the appropriate sep parameter
And should we try to handle conversion? My instinct is no - deciding how to format the printing of an object should be left to the user, this package should just handle moving that text to the clipboard.
The text was updated successfully, but these errors were encountered: