📜  按索引删除列 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:52:01.685000             🧑  作者: Mango

代码示例1
#drop columns by index
df <- mydata[ -c(1,3:4) ]
#drop columns by name
df = subset(mydata, select = -c(x,z))