🔍
🏠
Stack Overflow
🎲
Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
In R how do you change a character vector into the ASCII code equivalent?
Asked
Sep 08 '15 at 01:44
Active
Sep 08 '15 at 01:51
Viewed
57 times
1
I came up with this:
as.numeric(charToRaw("ABC")) [1] 65 66 67
Is there an R function to do this?
r
edited Sep 08 '15 at 01:51
Joshua Ulrich
173,410
32
338
418
asked Sep 08 '15 at 01:44
I meant a single R function like ord("A") outputs 65.
–
Sep 08 '15 at 01:48
utf8ToInt("ABC") is the answer. Thanks!
–
Sep 08 '15 at 01:54
0 Answers
0