pak
pak copied to clipboard
error while on network drive
I have a folder that is setup with packrat
. When I try to install packages using pak::pkg_install("stringi")
. I get this error
Error in read.dcf(file.path(path, "DESCRIPTION")) :
cannot open the connection
In addition: Warning message:
In read.dcf(file.path(path, "DESCRIPTION")) :
cannot open compressed file 'P:/working folder/projects/rshiny_projects/shiny_app-working/code/packrat/lib/x86_64-w64-mingw32/3.5.0/stringi/DESCRIPTION', probable reason 'No such file or directory'
I deleted all packrat folder and then re-initiated with packrat::init(infer.dependencies = F)
. Then run pak::pkg_setup
`pak` will create its private package library in
`C:\Users\gade04\AppData\Local\R-pkg\Cache/lib/3.5`.
It will try to copy packages from your regular library
See `?pak_setup()` for alternatives.
Do you want to continue (Y/n)? Y
Creating private lib in `C:\Users\gade04\AppData\Local\R-pkg\Cache/lib/3.5`...
Created private lib in `C:\Users\gade04\AppData\Local\R-pkg\Cache/lib/3.5`..
Question How can I create private library for the current project inside the project dir rather than in above default path that pak chose. ? Not sure if this is a good practice to create a private library for every project folder I work with ( something like packrat) ?
re-run pak::pkg_install("stringi")
. Now, it throws a different error
i Checking for package metadata updates
v All 10 metadata files are current.
√oa Loading session disk cached package metadata
v Using cached package metadata
Error in res_add_defaults(entries) :
Wrong entry types: `filesize (double, expected integer)`
In addition: Warning message:
package ‘pak’ was built under R version 3.5.3
I ran this
> pak::pak_sitrep()
* pak version:
- 0.1.2
* Library path:
- C:/Users/gade04/Documents/R/win-library/3.5
- C:/Users/gade04/Documents/R/R-3.5.1/library
* Private library location:
- C:\Users\gade04\AppData\Local\R-pkg\Cache/lib/3.5
* Private library exists.
* Private library is functional
sessioninfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 rematch2_2.0.1 xml2_1.2.0 magrittr_1.5
[5] hms_0.4.2 progress_1.2.0 rappdirs_0.3.1 uuid_0.1-2
[9] R6_2.4.0 rlang_0.3.1 cliapp_0.1.0 fansi_0.4.0
[13] stringr_1.4.0 tools_3.5.1 pak_0.1.2 pkgcache_1.0.3
[17] utf8_1.1.4 cli_1.0.1 selectr_0.4-1 withr_2.1.2
[21] assertthat_0.2.0 digest_0.6.18 tibble_2.1.1 crayon_1.3.4
[25] curl_3.3 glue_1.3.1 stringi_1.4.3 compiler_3.5.1
[29] pillar_1.3.1 filelock_1.0.2 prettyunits_1.0.2 pkgconfig_2.0.2
I'm getting the same error here, with current CRAN, current github master, R 3.5.2 and R 3.5.3 ... No clue where this is coming from ...
library(pak)
pkg_install("usethis")
#> i Checking for package metadata updates
#> v Using cached package metadata
#> Error in res_add_defaults(entries): Wrong entry types: `filesize (double, expected integer)`
Created on 2019-03-18 by the reprex package (v0.2.1)
Session info
sessionInfo()
#> R version 3.5.3 (2019-03-11)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 16299)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252
#> [3] LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C
#> [5] LC_TIME=Dutch_Belgium.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] pak_0.1.2.9000
#>
#> loaded via a namespace (and not attached):
#> [1] cliapp_0.1.0 Rcpp_1.0.1 compiler_3.5.3
#> [4] pillar_1.3.1 highr_0.7 base64enc_0.1-3
#> [7] prettyunits_1.0.2 tools_3.5.3 progress_1.2.0
#> [10] pkgbuild_1.0.2 uuid_0.1-2 digest_0.6.18
#> [13] jsonlite_1.6 evaluate_0.13 tibble_2.1.1
#> [16] pkgconfig_2.0.2 rlang_0.3.1 cli_1.0.1
#> [19] filelock_1.0.2 curl_3.3 yaml_2.2.0
#> [22] xfun_0.5 withr_2.1.2 stringr_1.4.0
#> [25] knitr_1.22 xml2_1.2.0 desc_1.2.0
#> [28] hms_0.4.2 rappdirs_0.3.1 rprojroot_1.3-2
#> [31] glue_1.3.1 R6_2.4.0 processx_3.3.0
#> [34] fansi_0.4.0 rmarkdown_1.12 callr_3.2.0
#> [37] selectr_0.4-1 magrittr_1.5 rematch2_2.0.1
#> [40] backports_1.1.3 pkgdepends_0.0.0.9003 ps_1.3.0
#> [43] htmltools_0.3.6 assertthat_0.2.0 lpSolve_5.6.13
#> [46] pkgcache_1.0.3.9001 stringi_1.4.3 crayon_1.3.4