Install packages error with SlicerMorphR

Downloading GitHub repo SlicerMorph/SlicerMorphR@HEAD
tar.exe: could not chdir to 'C:/Users/adria/AppData/Local/Temp/RtmpiWq4kl/remotes26e850ef3a9d'

Error: Failed to install 'SlicerMorphR' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
Además: Aviso:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\adria\AppData\Local\Temp\RtmpiWq4kl\file26e81f79e.tar.gz" -C "C:/Users/adria/AppData/Local/Temp/RtmpiWq4kl/remotes26e850ef3a9d"’ returned error code 1

What command did you run for installing?

Thanks for your reply Alex. I tried several ways:

devtools::install_github('SlicerMorph/SlicerMorphR') and remotes::install_github('SlicerMorph/SlicerMorphR')

That's weird, I ran the exact same command, it works for me. The error message indicates no DESCRIPTION file, but there is obviously a DESCRIPTION file in the Github repo.

A first guess would be that somehow the file got corrupted during download (is that even possible?), and maybe if you just retry in a fresh session it will work.

tar.exe: could not chdir to 'C:/Users/adria/AppData/Local/Temp/RtmpiWq4kl/remotes26e850ef3a9d'

Is it possible that your computer's hard drive is full, and failed to create the temporary directory?

I would suggest to git clone the repository on your computer, and use devtools::load_all() or devtools::install() within this repository. At least, you will see directly what's happening.

It is worth to give pak a go:

install.packages("pak")
pak::pkg_install("SlicerMorph/SlicerMorphR")

Hi!

I´m sorry about delayed reply. I´ve use devtools::load_all() and obtain this message:

devtools::load_all()
Error in value[3L]:
! Could not find a root 'DESCRIPTION' file that starts with '^Package' in 'F:\Sync\Adrian\Tesis Doctoral\Análisis\R'.
ℹ Are you in your project directory and does your project have a 'DESCRIPTION' file?
Run rlang::last_trace() to see where the error occurred.
> rlang::last_trace()
<error/pkgload_no_desc>
Error in value[3L]:
! Could not find a root 'DESCRIPTION' file that starts with '^Package' in 'F:\Sync\Adrian\Tesis Doctoral\Análisis\R'.
ℹ Are you in your project directory and does your project have a 'DESCRIPTION' file?
---
Backtrace:

1. └─devtools::load_all()
2. └─pkgload::load_all(...)
3. └─pkgload::pkg_path(path)
4. └─base::tryCatch(...)
5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
7. └─value[[3L]](cond)
Run rlang::last_trace(drop = FALSE) to see 2 hidden frames.

If there are files set to "hidden" in the file download path . tar (C:/Users/adria/AppData/Local/Temp/RtmpiWq4kl/remotes26e850ef3a9d) can influence?

Sorry I wasn't clear enough: devtools::load_all() has to be run inside the package directory.

One way to do it: in RStudio, select New Project, then "Version Control" and "Git". As repository URL, paste "https://github.com/SlicerMorph/SlicerMorphR". In "Create Project as subdirectory of" set wherever you want to store the package.

RStudio should then download everything and open a new window. In this, try running devtools::load_all().

I don't expect this to be a problem.

I think that "Git" isn´t install in my pc´s

Indeed, in that case you can do it the manual way. Go to https://github.com/SlicerMorph/SlicerMorphR, click on the green "Code" button, and on "Download ZIP" (or click here).

Then uncompress the zip file, in RStudio select "New Project" > "Existing Directory" and choose the path to the uncompressed content. Careful: it should be the directory that contains the files, for example:

C:/Users/Alexis/Downloads/SlicerMorphR-main/SlicerMorphR-main

(notice that there is a SlicerMorphR-main subdirectory inside the SlicerMorphR-main directory).

Then same thing, Create Project and devtools::load_all().

Thank you very much for all the indications and patience. Finally I was able to install the package, it has very useful functions for my work.

Greetings

Adrian

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.