如何引用R语言版本以及R包版本

在分析数据时,我们需要引用R语言的特定版本,以及使用R包的版本,其实R语言中有代码可以调用,下面介绍一下。

1,引用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/.

A BibTeX entry for LaTeX users is

  @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/.

如果是BibText的LaTex格式,可以用这种格式:

  @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/},
  }

各取所需。

2,引用R包

首先这个包是已经安装过的,比如ggplot2,可以写为:

citation("ggplot2")

注意:需要放到双引号里面,否则会报错。

代码运行结果:

> citation("ggplot2")

To cite ggplot2 in publications, please use:

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

A BibTeX entry for LaTeX users is

  @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},
  }

> 

结果也是两种形式,一个是直接贴到文章中,一个是LaTex格式。

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

3,更灵活的方法

使用R包:pacman,里面的函数比较灵活,有:

  • p_cite
  • p_citation

它的优点R包不用双引号包裹,更灵活。

R包引用:

pacman::p_cite()
> pacman::p_cite()
sh: xclip: command not found

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/.

A BibTeX entry for LaTeX users is

  @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.

也可以:

 pacman::p_citation()
> pacman::p_citation()
sh: xclip: command not found

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/.

A BibTeX entry for LaTeX users is

  @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包:

 pacman::p_cite(ggplot2)
> pacman::p_cite(ggplot2)
sh: xclip: command not found

To cite ggplot2 in publications, please use:

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

A BibTeX entry for LaTeX users is

  @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},
  }

这样就不用担心引用R语言和R包了。

相关推荐

  1. 如何引用R语言版本以及R版本

    2024-01-17 10:10:03       59 阅读
  2. Android R以上版本中APP外部存储实现

    2024-01-17 10:10:03       29 阅读
  3. R中删除原有的并安装特定版本

    2024-01-17 10:10:03       35 阅读
  4. 工具:安装R语言R的各种方法

    2024-01-17 10:10:03       29 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-17 10:10:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-17 10:10:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-17 10:10:03       87 阅读
  4. Python语言-面向对象

    2024-01-17 10:10:03       96 阅读

热门阅读

  1. 对上面有要求的树形dp:0115A

    2024-01-17 10:10:03       53 阅读
  2. ChatGPT 和文心一言哪个更好用?

    2024-01-17 10:10:03       52 阅读
  3. Vue面试之Mixins

    2024-01-17 10:10:03       53 阅读
  4. NineAi 新版AI系统网站源码 ChatGPT

    2024-01-17 10:10:03       57 阅读
  5. IOS元素定位对应关系

    2024-01-17 10:10:03       51 阅读
  6. 卖二手的教训:坏了要及时售后

    2024-01-17 10:10:03       55 阅读
  7. Docker容器运行多个php,一个正常另一个报502

    2024-01-17 10:10:03       60 阅读