| base64enc | R Documentation |
Encodes / decodes a character string or arbitrary R object to base64 encoding.
base64enc(x, convert = TRUE) base64dec(x, convert = TRUE)
x |
an object. |
convert |
For base64enc: [default TRUE] logical TRUE to encode
to a character string or FALSE to a raw vector. |
For encoding: a scalar string or raw vector (with no attributes) is encoded directly, whilst all other objects are first serialised (using R serialisation version 3, big-endian representation).
For decoding: the value of 'convert' should be set to TRUE, FALSE or NA to be the analogue of the above 3 cases in order to return the original object.
For base64enc: A character string or raw vector depending on the value of 'convert'.
For base64dec: A character string, raw vector, or other object depending on the value of 'convert'.
base64enc("hello world!")
base64dec(base64enc("hello world!"))
base64enc(as.raw(c(1L, 2L, 4L)), convert = FALSE)
base64dec(base64enc(as.raw(c(1L, 2L, 4L))), convert = FALSE)
base64enc(data.frame())
base64dec(base64enc(data.frame()), convert = NA)