Created
September 4, 2021 15:50
-
-
Save jmbarbone/b1d0c1535e20c7555b1b890530d8eeda to your computer and use it in GitHub Desktop.
Playing with character and raw values
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
# Char to Raw to Character | |
charToRaw("Jordan") |> | |
as.character() |> | |
as.hexmode() |> | |
as.raw() |> | |
rawToChar() | |
# Tricks |> | |
brackets <- `[[` | |
"4a 6f 72 64 61 6e" |> | |
strsplit(" ") |> | |
brackets(1) |> | |
as.hexmode() |> | |
as.raw() |> | |
# Sometimes better | |
rawToChar(multiple = TRUE) |> | |
paste(collapse = "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment