按名称删除数据帧列如何使用node.js中的数据发出出站HTTP POST请求?
3 回答
德玛西亚99
TA贡献1770条经验 获得超3个赞
DF <- data.frame(
x=1:10,
y=10:1,
z=rep(5,10),
a=11:20)drops <- c("x","z")DF[ , !(names(DF) %in% drops)]keeps <- c("y", "a")DF[keeps]drop
keeps <- "y"DF[ , keeps, drop = FALSE]
drop=TRUEy.
LEATH
TA贡献1936条经验 获得超7个赞
subset
df <- data.frame(a = 1:10, b = 2:11, c = 3:12)df <- subset(df, select = c(a, c))
df <- subset(df, select = -c(a, c))
繁华开满天机
TA贡献1816条经验 获得超4个赞
within(df, rm(x))
within(df, rm(x, y))
data.table
dt[, x := NULL] # Deletes column x by reference instantly.dt[, !"x"] # Selects all but x into a new data.table.
dt[, c("x","y") := NULL]dt[, !c("x", "y")]- 3 回答
- 0 关注
- 724 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消
