Packrat:快照与恢复的顺序重要吗?

Packrat:快照与恢复的顺序重要吗?,r,packrat,R,Packrat,有时在使用packrat时,在检查packrat库的状态时会得到这种输出: > packrat::status() The following packages are tracked by packrat, but are no longer available in the local library nor present in your code: _ viridisLite 0.2.0 You can call pack

有时在使用packrat时,在检查packrat库的状态时会得到这种输出:

> packrat::status()

The following packages are tracked by packrat, but are no longer available in the local library nor present in your code:
                _      
    viridisLite   0.2.0

You can call packrat::snapshot() to remove these packages from the lockfile, or if you intend to use these packages, use packrat::restore() to restore them to your private library.

The following packages have been updated in your library, but have not been recorded in packrat:
              library   packrat
    RSQLite       2.0        NA
    blob        1.1.0        NA
    formatR       1.5        NA

Use packrat::snapshot() to record these packages in packrat.

The following packages are out of sync between packrat and your current library:
                  packrat    library
    BH           1.65.0-1   1.60.0-2
    R6              2.2.2      2.2.0
    Rcpp          0.12.13     0.12.7
    Rfacebook      0.6.17     0.6.15
    assertthat      0.2.0        0.1
    backports       1.1.1      1.0.5
    colorspace      1.3-2      1.2-6
    curl              3.0        2.1
    dplyr           0.7.4      0.5.0
    htmltools       0.3.6      0.3.5
    httr            1.3.1      1.2.1
    jsonlite          1.5        1.4
    lazyeval        0.2.1      0.2.0
    openssl         0.9.8      0.9.4
    reshape2        1.4.2      1.4.1
    scales          0.5.0      0.4.1
    stringi         1.1.5      1.1.2
    tibble          1.3.4        1.2
    yaml           2.1.14     2.1.13

Use packrat::snapshot() to set packrat to use the current library, or use
packrat::restore() to reset the library to the last snapshot.
我的问题是:应该先运行哪个,
restore()
还是
snapshot()
?我查阅了packrat文档,但似乎没有一种方法可以进行参数化更新,即对包进行挑剔

更新:
根据下面Alex的建议,我收到了以下提示:

> packrat::restore()

Adding these packages to your library:
                _      
    viridisLite   0.2.0


Removing these packages from your library:
            _      
    RSQLite   2.0  
    blob      1.1.0
    formatR   1.5  
    memoise   1.1.0


Upgrading these packages in your library:
                     from         to
    BH           1.60.0-2   1.65.0-1
    R6              2.2.0      2.2.2
    Rcpp           0.12.7    0.12.13
    Rfacebook      0.6.15     0.6.17
    assertthat        0.1      0.2.0
    backports       1.0.5      1.1.1
    colorspace      1.2-6      1.3-2
    curl              2.1        3.0
    dplyr           0.5.0      0.7.4
    glue            1.1.1      1.2.0
    htmltools       0.3.5      0.3.6
    httr            1.2.1      1.3.1
    jsonlite          1.4        1.5
    lazyeval        0.2.0      0.2.1
    openssl         0.9.4      0.9.8
    reshape2        1.4.1      1.4.2
    rlang           0.1.1      0.1.4
    scales          0.4.1      0.5.0
    stringi         1.1.2      1.1.5
    tibble            1.2      1.3.4
    yaml           2.1.13     2.1.14

Do you want to continue? [Y/n]: 
答案是否定的

我想做的是删除
viridislite
,而不是添加它,我想按照建议添加
RSQLite
blob
formator


现在我也在想,
memoise
是如何出现的…

这取决于你想从
packrat
中得到什么。如果要加载最后一个快照,请使用
restore()
。如果更新project中使用的包,并希望创建新快照,请在本例中使用
snapshot()

,该项目是从远程git存储库中获取的,并且packrat版本似乎超过了本地库中的版本……在本例中,应首先使用restore()。