001、
data <- data.frame(x1 = c(1, 2, 3, 4),
x2 = c(5, 6, 7, 8)) ## 测试数据框
data
transform(data, x1 = x1 + 10) ## 修改列
transform(data, x1 = x1 + 10, x2 = x2 * 10, x3 = x1 + x2, x4 = x1 * x2) ## 添加列
标签:语言,001,data,transform,函数
来源: https://www.cnblogs.com/liujiaxin2018/p/16554182.html