Hello, I am new with R and I have a very simple problem to fix: I have a vector as it: vector <- c(1,2,3,4)
from this vector I would like to have a string like this: "1; 2; 3; 4". it's possible to do it?
Welcome to the community!
Try using paste:
paste
> x <- c(1, 2, 3, 4) > paste(x, collapse="; ") [1] "1; 2; 3; 4"
Hope this helps.
absolutely yes, Thank you very much
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.