原文:tibble包实现简单数据框(tibble、data.frame)

使用tibble实现简单数据框 . 创建tibble as tibble iris 可以通过 tibble 函数使用一个向量来创建新 tibble。tibble 会自动重复长度为 的输入,并可以使用刚刚创建的新变量,如下所示: tibble x : , y , z x y tibble 函数的功能要少得多:它不能改变输入的类型 例如,不能将字符串转换为因子 变量的名称,也不能创建行名称。 可以在 ...

2021-11-19 14:59 0 1599 推荐指数:

查看详情

数据排序 data.frame order

# sorting examples using the mtcars datasetattach(mtcars)# sort by mpgnewdata <- mtcars[order(mpg ...

Wed Jan 28 23:09:00 CST 2015 0 3103
替换 data.frame 中的特殊的值

替换空值: foo <- data.frame("day"= c(1, 3, 5, 7), "od" = c(0.1, "#N/A", 0.4, 0.8)) NAs <- foo == "#N/A" ## by replace method is.na(foo ...

Sat Jun 04 04:42:00 CST 2016 0 3990
R语言合并data.frame

Merging Data Adding Columns To merge two data frames (datasets) horizontally, use the merge function. In most cases, you join two data frames ...

Sat Apr 18 04:29:00 CST 2015 0 10500
使用R语言-操作data.frame

1 向一个data.frame指定列插入一列新数据   1.1 插入一列到指定位置     插到data1末尾     插到第一列 2 向一个data.frame指定行插入一行新数据   2.1 插入一行到指定位置     插入 ...

Sun Apr 26 19:41:00 CST 2015 1 23034
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM