Tengo la siguiente frase:
It is tricky for authors to figure out which keys will work, and how their values will be specified. Lamentably, it may be necessary to read the source code of an R package like rmarkdown to understand all of the details. However, usually, there is some relief in the fact that there is one example working document to exemplify the settings for a particular back end and authors can adjust and modify those values. The key:value pairs may may a difference at several stages in the compilation process.
He intentado tener todo el texto en un vector.
Lo que he hecho es ponerlo todo en un vector. De la siguiente manera:
x<-c("It is tricky for authors to figure out which keys will work, and how their values will be specified. Lamentably, it may be necessary to read the source code of an R package like rmarkdown to understand all of the details. However, usually, there is some relief in the fact that there is one example working document to exemplify the settings for a particular back end and authors can adjust and modify those values. The key:value pairs may may a difference at several stages in the compilation process.")
Después usé la función strsplit para separa cada palabra, de la siguiente manera:
palabras<-strsplit(x, "\\s")
Que me resulta:
[1] "It" "is" "tricky" "for" "authors" "to" "figure" "out"
[9] "which" "keys" "will" "work," "and" "how" "their" "values"
[17] "will" "be" "specified." "Lamentably," "it" "may" "be" "necessary"
[25] "to" "read" "the" "source" "code" "of" "an" "R"
[33] "package" "like" "rmarkdown" "to" "understand" "all" "of" "the"
[41] "details." "However," "usually," "there" "is" "some" "relief" "in"
[49] "the" "fact" "that" "there" "is" "one" "example" "working"
[57] "document" "to" "exemplify" "the" "settings" "for" "a" "particular"
[65] "back" "end" "and" "authors" "can" "adjust" "and" "modify"
[73] "those" "values." "The" "key:value" "pairs" "may" "may" "a"
[81] "difference" "at" "several" "stages" "in" "the" "compilation" "process."
Pero no sé como de ahí convertirlo todas esas palabras en un vector.
Es decir tener un vector de 88 elementos.
No sé que paso más hacer...
¿Existe alguna función que me permita resolver este problema de manera sencilla?