找不到gt中的cols_add

huangapple go评论74阅读模式
英文:

Can't find cols_add in gt

问题

我找不到像cols_add、row_group_order、rows_add这样的函数...(可能还有其他的)
如果我运行带有cols_add的代码,会出现错误'could not find function 'cols_add''。
我想知道...是我的问题吗?还是需要报告的问题?

这是gt(关于cols_add)的网站。
https://gt.rstudio.com/reference/cols_add.html

这是结果的索引部分 > library(help = 'gt')

cells_title             用于定位表格标题和副标题的位置助手
cols_align              设置列的对齐方式
cols_align_decimal      将列中的所有数值沿着小数点对齐
cols_hide               隐藏一个或多个列
cols_label              重新标签一个或多个列
cols_label_with         使用函数重新标签列
cols_merge              从两个或多个列中合并数据到一个单独的列
cols_merge_n_pct        合并两列以组合计数和百分比
cols_merge_range        合并两列以创建值范围列
cols_merge_uncert       合并列以创建带不确定性的值列
cols_move               移动一个或多个列
cols_move_to_end        将一个或多个列移动到末尾
cols_move_to_start      将一个或多个列移动到开头
cols_unhide             取消隐藏一个或多个列
cols_width              设置列的宽度
countrypops             1960年至2021年各国每年的人口

我认为我已经尽力了,但我是R的初学者...所以如果有什么我可以帮助的,请让我知道...

谢谢你

英文:

I couldn't find some functions like cols_add, row_group_order, rows_add.. (may be more)
If I run code with cols_add, there are error 'could not find function 'cols_add'"
I want to know.. is it my fault? or is it problem so need to report?

this is website of gt (about cols_add)
https://gt.rstudio.com/reference/cols_add.html

this is part of index of the result > library(help = 'gt')

cells_title             Location helper for targeting the table title
                        and subtitle
cols_align              Set the alignment of columns
cols_align_decimal      Align all numeric values in a column along the
                        decimal mark
cols_hide               Hide one or more columns
cols_label              Relabel one or more columns
cols_label_with         Relabel columns with a function
cols_merge              Merge data from two or more columns to a single
                        column
cols_merge_n_pct        Merge two columns to combine counts and
                        percentages
cols_merge_range        Merge two columns to a value range column
cols_merge_uncert       Merge columns to a value-with-uncertainty
                        column
cols_move               Move one or more columns
cols_move_to_end        Move one or more columns to the end
cols_move_to_start      Move one or more columns to the start
cols_unhide             Unhide one or more columns
cols_width              Set the widths of columns
countrypops             Yearly populations of countries from 1960 to
                        2021

I think I do my best but i'm beginner of R.. so if there are anything I can please let me know...

thank you

答案1

得分: 0

cols_add在写作时已合并到gt存储库的主分支中,因此似乎还没有进入CRAN版本。但在通过Github安装开发版本后,它就在那里:

devtools::install_github("rstudio/gt")
gt::cols_add

# function (.data, ..., .before = NULL, .after = NULL) 
# {
# 等等。

<details>
<summary>英文:</summary>

[`cols_add` was merged into the master branch of the `gt` repository (at the time of writing) four days ago][1], so it seems to have not made its way into the CRAN version yet. But after installing the development version via Github, it is there:

devtools::install_github("rstudio/gt")
gt::cols_add

function (.data, ..., .before = NULL, .after = NULL)

{

etc.


  [1]: https://github.com/rstudio/gt/pull/1367

</details>



huangapple
  • 本文由 发表于 2023年7月11日 13:32:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76658932.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定