How to merge two data frames with different column names in the R programming language. More details: https://statisticsglobe.com/r-combine...
R code of this video:
data1 <- data.frame(x1 = 1:5, # First data frame
x2 = letters[1:5])
data1
data2 <- data.frame(x2 = LETTERS[11:15], # Second data frame
x3 = 777)
data2
install.packages("dplyr") # Install & load dplyr
library("dplyr")
bind_rows(data1, data2) # Applying bind_rows function
Follow me on Social Media:
Facebook: / statisticsglobecom
Patreon: / statisticsglobe
Pinterest: https://www.pinterest.de/JoachimSchork
Reddit: / joachimschork
Twitter: / joachimschork
Watch video Combine Two Data Frames with Different Variables by Rows in R (Example) | bind_rows Function [dplyr] online without registration, duration hours minute second in high quality. This video was added by user Statistics Globe 27 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,968 once and liked it 73 people.