找不到gt中的cols_add

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

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')

  1. cells_title 用于定位表格标题和副标题的位置助手
  2. cols_align 设置列的对齐方式
  3. cols_align_decimal 将列中的所有数值沿着小数点对齐
  4. cols_hide 隐藏一个或多个列
  5. cols_label 重新标签一个或多个列
  6. cols_label_with 使用函数重新标签列
  7. cols_merge 从两个或多个列中合并数据到一个单独的列
  8. cols_merge_n_pct 合并两列以组合计数和百分比
  9. cols_merge_range 合并两列以创建值范围列
  10. cols_merge_uncert 合并列以创建带不确定性的值列
  11. cols_move 移动一个或多个列
  12. cols_move_to_end 将一个或多个列移动到末尾
  13. cols_move_to_start 将一个或多个列移动到开头
  14. cols_unhide 取消隐藏一个或多个列
  15. cols_width 设置列的宽度
  16. 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')

  1. cells_title Location helper for targeting the table title
  2. and subtitle
  3. cols_align Set the alignment of columns
  4. cols_align_decimal Align all numeric values in a column along the
  5. decimal mark
  6. cols_hide Hide one or more columns
  7. cols_label Relabel one or more columns
  8. cols_label_with Relabel columns with a function
  9. cols_merge Merge data from two or more columns to a single
  10. column
  11. cols_merge_n_pct Merge two columns to combine counts and
  12. percentages
  13. cols_merge_range Merge two columns to a value range column
  14. cols_merge_uncert Merge columns to a value-with-uncertainty
  15. column
  16. cols_move Move one or more columns
  17. cols_move_to_end Move one or more columns to the end
  18. cols_move_to_start Move one or more columns to the start
  19. cols_unhide Unhide one or more columns
  20. cols_width Set the widths of columns
  21. countrypops Yearly populations of countries from 1960 to
  22. 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安装开发版本后,它就在那里:

  1. devtools::install_github("rstudio/gt")
  2. gt::cols_add
  3. # function (.data, ..., .before = NULL, .after = NULL)
  4. # {
  5. # 等等。
  1. <details>
  2. <summary>英文:</summary>
  3. [`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. [1]: https://github.com/rstudio/gt/pull/1367
  2. </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:

确定