I am new in R and I am quite confused about the data structure. I am dealing with two vectors, each vector containing strings of character as below:
And in order to append these vectors, I used the append function as follows:
text_append <- append(vector1, vector2)
But, once I append it, it creates two separate lists, whereas I wanted it to become just 1 list
How can I make sure that I make 1 whole list of strings? I am compiling the strings, and making them as separate list wont help. I dont know what else to do.
Thanks for the help
I tried to use the append function
text_append <- append(vector1, vector2)
I expected it to retrieve me a single list of strings, but instead it gives me two separate lists.
class(v1)
sayslist
you have to unlist them before concatenation. E.g.c(unlist(v1), unlist(v2))
unlist(c(v1,v2))
... in any case, the problem is that your vector2 is a list (with one element), not a plain vector