Hello,
Try
x <- "(O, O, O, H, L, O, O, O, O)"
strsplit(gsub("\\(|\\)|[[:blank:]]", "", x), ",")
Note that the result is a list, not a vector. You can then use `[[` or
unlist().
Hope this helps,
Rui Barradas
Em 28-06-2012 11:42, Jessy escreveu:
Dear all,
I have a vector of length 1 but
You can use gsub() to eliminate the parentheses, and strsplit() to separate
the elements.
Sarah
On Thursday, June 28, 2012, Jessy wrote:
> Dear all,
>
> I have a vector of length 1 but within this vector there are 9 elements
> > vectorNOcorrection
> [1] "(O, O, O, H, L, O, O, O, O)"
> can someon
2 matches
Mail list logo