【发布时间】:2020-11-17 02:20:51
【问题描述】:
在 readr 中,read_csv 命令通过重命名第二个重复的列名来处理重复的列名,并使第一个保持不变。请参阅以下示例,取自 https://github.com/tidyverse/readxl/issues/53。
readr::read_csv("x,x,y\n1,2,3\n")
#> Warning: Duplicated column names deduplicated: 'x' => 'x_1' [2]
#> # A tibble: 1 × 3
#> x x_1 y
#> <int> <int> <int>
#> 1 1 2 3
我怎样才能让readxl::read_excel 以同样的方式处理重复的列?
【问题讨论】: