• 数据格式如下:
a    b    c    d    e
1    2    3    4    5
  • 使用select过滤不要的列
df[,-which(names(df)%in%c("a","b")]
subset(df,select=-c(a,b))
  • 使用select选择想要的列
df[ , c("x","y")]
subset(df, select=c(x,y))

相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2021-08-16
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案