Skip to content
Prev 16870 / 398513 Next

ASCII characters: from decimal code to R octal?

Is there a straightforward way to convert character information from 
decimal representation to the octal one used by R?

I'd like something like a function ascii(number,base=10), such that
[1] "\133"

I can easily do the mapping from 91 to 133, but what is a good way to 
operate on  133 to deliver "\133"?

Would a lookup table be a better solution?

David