rstudio / rstudio/packrat

packrat isn't recognising installed package (purrr specifically)

Open
#558 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
409
Forks
89
PR merge metrics
No merged PRs in 30d

Description

was trying to install purrr, however I think unbeknownst to me it had been installed as a dependency of a previous package, so I got this result

> install.packages("purrr")
Installing package into ‘C:/Users/%MYDIRECTORYHERE%/packrat/lib/x86_64-w64-mingw32/3.6.0’
(as ‘lib’ is unspecified)
trying URL 'https://mirror.las.iastate.edu/CRAN/bin/windows/contrib/3.6/purrr_0.3.2.zip'
Content type 'application/zip' length 421290 bytes (411 KB)
downloaded 411 KB

package ‘purrr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot remove prior installation of package ‘purrr’

The downloaded binary packages are in
	C:\Users\CURE\AppData\Local\Temp\RtmpoppOiT\downloaded_packages

now in the packrat directory there is a purrr folder with package files but in the packages tab of rstudio it shows this

image

status gives this error

> packrat::status()
Error in if (pkg$name == pkgName) return(pkg) : 
  argument is of length zero
In addition: Warning message:
In FUN(X[[i]], ...) : No DESCRIPTION file for installed package 'purrr'

snapshot gives this error

> packrat::snapshot()
Error: Unable to retrieve package records for the following packages:
- "purrr"

trying to remove the package gives this error

> remove.packages("purrr")
Removing package from ‘C:/Users/CURE/Documents/code/r/spring-2019-survey-2/packrat/lib/x86_64-w64-mingw32/3.6.0’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘purrr’

(but again it is there in the specified location)

library gives this error

> library("purrr")
Error in library("purrr") : there is no package called ‘purrr’

however the package and functions are accessible by calling with the full package name

> purrr::map(1:4, ~ . + 2)
[[1]]
[1] 3

[[2]]
[1] 4

[[3]]
[1] 5

[[4]]
[1] 6

I'm using RStudio 1.2.1335, R version 3.6.0, packrat 0.5.0, Windows 10 version 1809 - all R-related things were installed yeserday on a greenfield project and I had just updated windows so im running pretty much the latest version of everything

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows setup with R 3.6.0 and packrat 0.5.0, installing purrr and running packrat::status() and packrat::snapshot(). Trace how the package is discovered in the packrat library and how its DESCRIPTION file is read; done means an installed purrr package is recognized without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.