combine 2 dataframes having different column names

前端 未结 2 1442
一个人的身影
一个人的身影 2021-01-21 13:12

In R ,I have 2 data frames both having different column name. I want to combine the rows of each data frame according to the column number. the dataframes i have is as follows<

2条回答
  •  情书的邮戳
    2021-01-21 13:24

    If it's this simple I'd be inclined to use:

    colnames(d1) <- colnames(d2) <- c("ticker", "value")
    rbind.data.frame(d1, d2)
    

提交回复
热议问题