I have a dataframe with a variable called var1 and var2. There are 5 observations, as follows:
var1 var2
1 hello there
2 my name is
3 john and
4 i am 30 years
5 old
is there a way to concatenate each observation string in var2 into one string? for example, create a string that concatenates the observations within a var: "hello there my name is john and i am 30 years old"
I looked everywhere online for a way to turn each observation for a particular var into one string, but could not find an example.