Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
mutate/tibble 中的自定义函数
我正在关注一个tutorial https cran r project org web packages broom vignettes kmeans html我正在尝试将这部分应用于我的数据 问题 kclusts lt tibble k
r
kmeans
tibble
无法向分组数据框添加行
这是这个问题的后续问题如何将行添加到数据框中仅修改某些列 https stackoverflow com questions 71095723 how to add a row to a dataframe modifying only s
r
DataFrame
dplyr
tibble
如何将行添加到数据框中仅修改某些列
为了准备用于绘图的数据 我需要向数据添加一个新行 我有这个数据框 df lt data frame test id c 1 1 1 1 test nr c 1 1 1 1 region c A B C D test value c 3 1
r
DataFrame
dplyr
tibble
使用 dplyr 和 add_row() 在每个组中添加行
如果我添加一个新行iris数据集 iris lt as tibble iris gt iris gt add row before 0 A tibble 151 5 Sepal Length Sepal Width Petal Length
r
DataFrame
dplyr
row
tibble
R data.table:如何从 tibble 到 data.table 再到 tibble 返回?
我主要使用中的表格tibble格式来自tidyverse 但对于某些步骤 我使用data table包裹 我想看看转换的最佳方法是什么数据表回到tibble 我明白那个data table有一些巧妙的功能setDT https rdrr i
r
dataTable
tibble
在 tibble 中添加具有可变列名称的列
此代码无法在 tibble 中添加列 library tidyverse df lt data frame Oranges 5 mycols lt c Apples Bananas Oranges add column df mycols
r
dplyr
tibble
数据框能做什么而 tibble 不能做什么?
Tidyverse 的粉丝经常给出使用 tibbles 而不是数据帧的几个优点 其中大多数似乎都是为了保护用户免于犯错误而设计的 例如 与数据帧不同 tibbles 不需要一个 drop FALSE不从数据中删除维度的论点 不会让 运算符对
r
DataFrame
tibble
使用 rvest 抓取时,在缺失值的地方输入 NA
我想用rvest抓取一个页面 其中包含最近一次会议上演讲的标题和运行时间 然后将这些值组合成一个tibble library tibble library rvest url lt https channel9 msdn com Event
r
rvest
tibble
将列表列表强制到数据帧,但在列表列中保留*一些*元素
我正在寻找一种方法来可靠地将列表结构强制为data frame or tibble同时维护一列或多列作为列表列 考虑以下列表结构 d data frame x 1 10 y 1 5 1 10 rnorm 10 ex list label A
r
tibble
使用 tidyr unite 将列值与列名称组合
我有一个data frame有几列 set seed 1 df lt data frame cluster LETTERS 1 4 group c rep m 2 rep f 2 point rnorm 4 err runif 4 0 1
r
tidyr
tibble
rownames_to_column 在 rowwise() 后无法正常工作
我有这个 df df lt structure list a 1 5 b 6 10 c 11 15 d c a b c d e e 1 5 row names c NA 5L class c tbl df tbl data frame a
r
dplyr
tibble
rowwise
rrownames
如何在一次运行中将每个命名的 tibble 保存为列表中的单独 tibble 或数据帧
这个问题与此相关如何在 R 中循环数据框中的列 应用扩展并创建新的数据框 https stackoverflow com questions 73436305 how to loop over the columns in a datafr
r
list
DataFrame
tibble
tbl_df 被转换为 S4 类中的列表
当我尝试使用时tbl df在中四班 tbl df插槽似乎转变为list library tibble setOldClass c tbl df tbl data frame setClass Class TestClass slots c
r
rs4
tibble
如何在没有 row.names / 行号的情况下打印 tibble
Tibbles 打印时使用行号作为行名称 看1 2在下面的左边距中 tibble as tibble mtcars A tibble 32 x 11 mpg cyl disp hp drat wt qsec vs am gear carb
r
tibble
将 tibble 转换为带有列标题的数据框
我从 Excel 工作表导入数据 如下所示 F4 Off lt readxl read xlsx myExcel xlsx sheet Offline col names TRUE range I1 L285 F4 Off F4 On lt
r
DataFrame
tibble
如何将列表列转换为 R 中 tibble 中的向量
我试图折叠下面的小标题 称为数据 中的 周 列 以便结果是具有两列的小标题 1 表示周 另一列表示相关值 由于周列是一个列表 我不知道该怎么做 能否请你帮忙 gt head data A tibble 6 x 1 Weeks Value
r
DataFrame
tibble
如何将
单元格重新编码为 tibble 列表列中的嵌套 NA (
)?
在带有列表列的小标题中 我如何替换
r
dplyr
purrr
tibble
为什么 as_tibble() 将浮点数四舍五入到最接近的整数?
在 dplyr 0 7 4 和 R 3 4 1 中使用 as tibble 时 我得到以下输出 mtcars gt aggregate disp cyl data mean gt as tibble 哪个输出 A tibble 3 x 2
r
dplyr
tibble
R - 如何通过嵌套 tibbles + pwalk(rmarkdown::render) 生成参数化报告
我正在尝试根据学生数据生成评估报告 我的想法是创建一个 RDS 嵌套 tibble 来传递给rmarkdown render using purrr pwalk 我对 purrr 及其它还比较陌生map函数族 这是有效的代码部分 尝试一下
r
report
rmarkdown
purrr
tibble
是否有更有效或更简洁的方法来使用 tidyr::gather 使我的数据看起来“整洁”?
我是使用 tidyverse 的新手 我想看看我使用这个包中的函数是否尽可能高效 简洁 我怀疑我不是 我的原始数据将键符号作为每个列名称的一部分 day a x b x a y b y 1 1 0 56047565 1 2240818 1
r
dplyr
tidyverse
tidyr
tibble
1
2
»