0

My first dataframe is:

df1 <- "C:/User"

And the second:

df2
 [1] "/Desktop"                                              
 [2] "/Desktop/all"                    
 [3] "/Programms"          

I would like to merge them to a df like this:

"C:/User/Desktop"
"C:/User/Desktop/all"
"C:/User/Programms"
Alni
  • 15
  • 8

1 Answers1

1

What you have there are character vectors, not data frames. You can simply use paste0().

x1 <- "C:/User"
x2 <- c("/Desktop", "/Desktop/all", "/Programms")
paste0(x1, x2)
# [1] "C:/User/Desktop"     "C:/User/Desktop/all" "C:/User/Programms"  
Rich Scriven
  • 97,041
  • 11
  • 181
  • 245