3
The following code returns me a vector of 12 letters:
res <- "ACDEDEAEDCED"
res <- strsplit(res,"", FALSE)
View(res[4])
Error in . subset2(x, i, Exact = Exact) : out-of-bounded index
More when I try to access a specific position and gives error.
I have tried many ways. Among them: res[1,4] and res[,4]...
One can use
unlist(strsplit(res,"", FALSE))orstrsplit(res,"", FALSE)[[1]]for the final result to be a vector, with the first grouping all the results of thestrsplitand the second holds only the first.– Molx