1

奇怪的问题,我不确定在哪里提出问题的正确位置。

当我在 R 中检查我的包版本rmarkdown时,它显示为 v2.4。但是,conda 说我安装了 v2.6。

C:\Users\ariel>R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> packageVersion("rmarkdown")
[1] '2.4'
>
Save workspace image? [y/n/c]: n
C:\Users\ariel>where R
C:\Users\ariel\miniconda3\Scripts\R.exe
C:\Users\ariel>conda list
# packages in environment at C:\Users\ariel\miniconda3:
#
# Name                    Version                   Build  Channel
_r-mutex                  1.0.1               anacondar_1    conda-forge
_tflow_select             2.3.0                     eigen
absl-py                   0.11.0           py38haa244fe_0    conda-forge
aiohttp                   3.7.3            py38h294d835_1    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
...
...
r-rex                     1.2.0             r40h6115d3f_1    conda-forge
r-rlang                   0.4.10            r40h6d2157b_0    conda-forge
r-rmarkdown               2.6               r40hc72bb7e_0    conda-forge
r-roxygen2                7.1.1             r40h796a38f_0    conda-forge
r-rprojroot               2.0.2             r40hc72bb7e_0    conda-forge
...
...
...

编辑:

在我的 WSL Linux 中

(base) balter@spectre:~$ conda list | grep rmarkdown
r-rmarkdown               2.6               r40hc72bb7e_0    conda-forge
(base) balter@spectre:~$ R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

current_conda_env: base
current_conda_prefix: /home/balter/conda
no compatible lib
pointing to conda env: base and lib location
[1] "/home/balter/conda/lib/R/library"
> packageVersion("rmarkdown")
[1] ‘2.6’
>

编辑2:

> .libPaths()
[1] "C:/Users/ariel/OneDrive/Documents/R/win-library/4.0"
[2] "C:/Users/ariel/miniconda3/Lib/R/library"
4

0 回答 0