Which function in R converts a string to a raw vector?

Which function in R converts a string to a raw vector?

a) rawToChar()
b) charToRaw()
c) str_raw()
d) raw_vector()

Answer:

b) charToRaw()

Explanation:

The charToRaw() function converts a character string into a raw vector in R.

Reference:

R Programming – String MCQ Questions and Answers

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top