4

我尝试处理readr功能。readr我的意思是,这是来自github 网页的示例:

read_csv("iris.csv", col_types = list(
  Sepal.Length = col_double(),
  Sepal.Width = col_double(),
  Petal.Length = col_double(),
  Petal.Width = col_double(),
  Species = col_factor(c("setosa", "versicolor", "virginica"))
))

是否有机会在read_csv可以一次确定col_double多个列的函数中使用,例如grepl("Length|Witdh",col_names) = col_double()

谢谢,

4

0 回答 0