I have a list of text that I copied from outside of R:
- Ex: a, b, c, d, e, f, g, h, i, j
I want to just quickly turn each word (in this case letter) to a character string for R to use:
- Ex: 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'
Is there a function or quick way to turn external text into string characters?
Example:
> a,b,c,d
Error: unexpected ',' in "a,"
> function(a,b,c,d)
[1] 'a','b','c','d'
I understand a simple function likely won't work because it will assume the non-character strings are unknown R objects. But there is likely some trick to make this work?
Note: I know I can do this in other programs (e.g., notepad ++) fairly quickly, but I'm wondering if it's possible to do so quickly in R?