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
In one of my logs I sometimes need to include results from file.info(.). Unfortunately, the returned mode is class octmode and throws the error
jsonlite::toJSON(file.info("does_not_exist"))
# Error: No method asJSON S3 class: octmode
Three ways it might be handled: as.integer, as.character, and paste0("0", .) (a nod towards the 0-prepend for octal in javascript). All have some merit; none of them support perfect round-trip transformation, though contextually the last (paste0) might suggest it.
What are your thoughts on this?
The text was updated successfully, but these errors were encountered:
In one of my logs I sometimes need to include results from
file.info(.)
. Unfortunately, the returnedmode
is classoctmode
and throws the errorThree ways it might be handled:
as.integer
,as.character
, andpaste0("0", .)
(a nod towards the 0-prepend for octal in javascript). All have some merit; none of them support perfect round-trip transformation, though contextually the last (paste0) might suggest it.What are your thoughts on this?
The text was updated successfully, but these errors were encountered: