• 如何引用R语言以及R包:文献引用


    数据分析中经常使用R语言以及相关R包,写文章时就需要引用。这里介绍两种方法。

    1. 默认的citeation函数

    1.1 引用R语言

    包括R版本和相关信息:

    注意,函数中什么参数都不添加,会返回R语言的版本和相关信息。

    citation()
    
    > citation()
    
    To cite R in publications use:
    
      R Core Team (2022). R: A language and environment for statistical
      computing. R Foundation for Statistical Computing, Vienna,
      Austria. URL https://www.R-project.org/.
    
    LaTeX的用户的BibTeX条目是
    
      @Manual{,
        title = {R: A Language and Environment for Statistical Computing},
        author = {{R Core Team}},
        organization = {R Foundation for Statistical Computing},
        address = {Vienna, Austria},
        year = {2022},
        url = {https://www.R-project.org/},
      }
    
    We have invested a lot of time and effort in creating R, please
    cite it when using it for data analysis. See also
    ‘citation("pkgname")for citing R packages.
    

    提取相关信息,就是:

    R Core Team (2022). R: A language and environment for statistical
    computing. R Foundation for Statistical Computing, Vienna,
    Austria. URL https://www.R-project.org/.12c

    1.2 引用具体R包

    比如,这里想引用ggplot2

    > citation("ggplot2")
    
    To cite ggplot2 in publications, please use:
    
      H. Wickham. ggplot2: Elegant Graphics for Data Analysis.
      Springer-Verlag New York, 2016.
    
    LaTeX的用户的BibTeX条目是
    
      @Book{,
        author = {Hadley Wickham},
        title = {ggplot2: Elegant Graphics for Data Analysis},
        publisher = {Springer-Verlag New York},
        year = {2016},
        isbn = {978-3-319-24277-4},
        url = {https://ggplot2.tidyverse.org},
      }
    

    把里面的内容,提取出来,就是:

    H. Wickham. ggplot2: Elegant Graphics for Data Analysis.
    Springer-Verlag New York, 2016.

    注意:如果R包没有在引号内,会报错:

    > citation(ggplot2)
    Error in system.file(package = package, lib.loc = lib.loc) : 
      object 'ggplot2' not found
    

    2. 使用pacman更友好的形式

    2.1 R语言引用

    两种方法:

    • p_cite()
    • p_citation()
    library(pacman)
    p_citation()
    

    2.2 R包引用

    四种方法:

    具体的R包,可以直接写名称,也可以用引号包裹:

    方法1:p_cite("ggplot2")
    方法2:p_cite(ggplot2)
    方法3:p_citation(ggplot2)
    方法4:p_citation("ggplot2")

    p_cite和p_citation都可以用,包的名称加不加引号都可以用,更人性化一点。

    p_cite(“ggplot2”)

    To cite ggplot2 in publications, please use:

    H. Wickham. ggplot2: Elegant Graphics for Data Analysis.
    Springer-Verlag New York, 2016.

    LaTeX的用户的BibTeX条目是

    @Book{,
    author = {Hadley Wickham},
    title = {ggplot2: Elegant Graphics for Data Analysis},
    publisher = {Springer-Verlag New York},
    year = {2016},
    isbn = {978-3-319-24277-4},
    url = {https://ggplot2.tidyverse.org},
    }

  • 相关阅读:
    centos7安装mariadb
    多关键词高亮显示
    树的常见面试题
    深入理解数据结构(2)——用数组实现队列
    在2023年使用Unity2021从Built-in升级到Urp可行么
    Vue--样式绑定
    k8s 读书笔记 - CRI(容器运行时接口)详解
    有没有免费的云渲染平台?哪家云渲染平台收费更合理?
    Nginx优化与防盗链
    使用Transformer实现自动调制识别(RML2016.10a,90%+精度(未调参优化))
  • 原文地址:https://blog.csdn.net/yijiaobani/article/details/127006256