I'm trying to create my first package in R. When I run "Check package" in RStudio, I get the following error message:
==> devtools::check(document = FALSE)
-- Building ------------------------------------------ w.api.r --
Setting env vars:
* CFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
-----------------------------------------------------------------
v checking for file 'C:\Users\einaf\Downloads\w.api.r/DESCRIPTION' (670ms)
- preparing 'w.api.r':
v checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts (360ms)
- checking for empty or unneeded directories
Omitted 'LazyData' from DESCRIPTION
- building 'w.api.r_0.1.0.tar.gz'
-- Checking ------------------------------------------ w.api.r --
Setting env vars:
* _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
* _R_CHECK_CRAN_INCOMING_ : FALSE
* _R_CHECK_FORCE_SUGGESTS_ : FALSE
* NOT_CRAN : true
-- R CMD check -----------------------------------------------------------------
- using log directory 'C:/Users/einaf/Downloads/w.api.r.Rcheck' (724ms)
- using R version 4.1.2 (2021-11-01)
- using platform: x86_64-w64-mingw32 (64-bit)
- using session charset: ISO8859-1
- using options '--no-manual --as-cran'
v checking for file 'w.api.r/DESCRIPTION' ...
- checking extension type ... Package
- this is package 'w.api.r' version '0.1.0'
- package encoding: UTF-8
v checking package namespace information
v checking package dependencies (4.6s)
v checking if this is a source package ...
v checking if there is a namespace
v checking for executable files (354ms)
v checking for hidden files and directories ...
v checking for portable file names ...
v checking serialization versions
E checking whether package 'w.api.r' can be installed (1.4s)
Installation failed.
See 'C:/Users/einaf/Downloads/w.api.r.Rcheck/00install.out' for details.
See
'C:/Users/einaf/Downloads/w.api.r.Rcheck/00check.log'
for details.
-- R CMD check results -------------------------------------- w.api.r 0.1.0 ----
Duration: 7.3s
> checking whether package 'w.api.r' can be installed ... ERROR
See below...
-- Install failure -------------------------------------------------------------
* installing *source* package 'w.api.r' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in library(httr) : es gibt kein Paket namens 'httr'
Fehler: kann R Programmkode in Paket 'w.api.r' nicht laden
Ausführung angehalten
ERROR: lazy loading failed for package 'w.api.r'
* removing 'C:/Users/einaf/Downloads/w.api.r.Rcheck/w.api.r'
1 error x | 0 warnings v | 0 notes v
Fehler: R CMD check found ERRORs
Ausführung angehalten
Exited with status 1.
I'm sorry that parts of it are in German. The translation is, that there is no package "httr" and that checking my own package was stopped.
What I don't understand is, that I can successfully use library(httr)
in the console and that I successfully can use the package httr after that while working on my package. I have no idea how to solve this issue.
What I have already tried:
- restarting RStudio
- updating R
- updating RStudio
- reinstalling httr
- reinstalling httr with
install.packages("httr", type = "binary")
- reinstalling httr with
install.packages("httr", dependencies = TRUE)
- rebuilding my package
I am very happy about any helpful suggestions and want to thank you in advance!