Error/Warning in R CMD check even though when i run R CMD the result is 0 errors v | 0 warnings v | 0 notes v

Hi, I really need help on submission of my first package. I seem to have an error or warning even though when i run R CMD the result is 0 errors v | 0 warnings v | 0 notes v. Below is the result of R CMD check. Kindly help me out. Thank you

==> devtools::check()

Updating geomod documentation
Loading geomod
'data.frame': 42 obs. of 5 variables:
BH : Factor w/ 42 levels "DO0_1","DO0_2",..: 1 2 3 4 5 6 7 8 9 10 ... Y : int 9553782 9553782 9553782 9553782 9553782 9553782 9554103 9554103 9554103 9554103 ...
X : int 571152 571152 571152 571152 571152 571152 571450 571450 571450 571450 ... Depth: num 2 2.5 4.5 6 7 8 3 4.5 5.5 7 ...
SPT : int 14 20 50 50 50 50 6 6 20 50 ... Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 42 obs. of 3 variables: .. .. BH : Factor w/ 42 levels "DO0_1","DO0_2",..: 1 2 3 4 5 6 7 8 9 10 ...
.. .. Depth: num [1:42] 2 2.5 4.5 6 7 8 3 4.5 5.5 7 ... .. .. SPT : int [1:42] 14 20 50 50 50 50 6 6 20 50 ...
..@ coords.nrs : int [1:2] 3 2
..@ coords : num [1:42, 1:2] 571152 571152 571152 571152 571152 ...
.. ..- attr(, "dimnames")=List of 2
.. .. .. : NULL .. .. .. : chr [1:2] "X" "Y"
..@ bbox : num [1:2, 1:2] 571152 9553782 571781 9554300
.. ..- attr(
, "dimnames")=List of 2
.. .. .. : chr [1:2] "X" "Y" .. .. .. : chr [1:2] "min" "max"
..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
.. .. ..@ projargs: chr "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs"
lithology.asc has GDAL driver AAIGrid
and has 218 rows and 386 columns
dem.asc has GDAL driver GTiff
and has 218 rows and 386 columns
morphology.asc has GDAL driver AAIGrid
and has 218 rows and 386 columns
Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots
..@ data :'data.frame': 84148 obs. of 3 variables:
.. .. PC2: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ... .. .. PC3: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ...
.. .. PC1: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ... ..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 570927 9553723 .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y" .. .. ..@ cellsize : num [1:2] 3.35 3.35 .. .. ..@ cells.dim : int [1:2] 386 218 ..@ bbox : num [1:2, 1:2] 570925 9553721 572218 9554451 .. ..- attr(*, "dimnames")=List of 2 .. .. .. : chr [1:2] "x" "y"
.. .. .. : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot .. .. ..@ projargs: chr "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs" Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots ..@ data :'data.frame': 84148 obs. of 3 variables: .. .. PC2: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ...
.. .. PC3: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ... .. .. PC1: num [1:84148] 0 0 0 0 0 0 0 0 0 0 ...
..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots
.. .. ..@ cellcentre.offset: Named num [1:2] 570927 9553723
.. .. .. ..- attr(, "names")= chr [1:2] "x" "y"
.. .. ..@ cellsize : num [1:2] 3.35 3.35
.. .. ..@ cells.dim : int [1:2] 386 218
..@ bbox : num [1:2, 1:2] 570925 9553721 572218 9554451
.. ..- attr(
, "dimnames")=List of 2
.. .. .. : chr [1:2] "x" "y" .. .. .. : chr [1:2] "min" "max"
..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
.. .. ..@ projargs: chr "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs"
Classes 'gstatVariogram' and 'data.frame': 9 obs. of 6 variables:
np : num 105 36 108 36 108 36 36 36 72 dist : num 0 51 79.2 122.5 133.1 ...
gamma : num 214.7 68.5 245.1 336.7 102.9 ... dir.hor: num 0 0 0 0 0 0 0 0 0
dir.ver: num 0 0 0 0 0 0 0 0 0 id : Factor w/ 1 level "var1": 1 1 1 1 1 1 1 1 1

  • attr(*, "direct")='data.frame': 1 obs. of 2 variables:
    .. id : Factor w/ 1 level "var1": 1 .. is.direct: logi TRUE
  • attr(*, "boundaries")= num 0 18.1 36.2 54.3 72.4 ...
  • attr(*, "pseudo")= num 0
  • attr(, "what")= chr "semivariance"
    [inverse distance weighted interpolation]
    Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots
    ..@ data :'data.frame': 84148 obs. of 2 variables:
    .. .. var1.pred: num [1:84148] -0.529 -0.53 -0.53 -0.531 -0.531 ... .. .. var1.var : num [1:84148] NA NA NA NA NA NA NA NA NA NA ...
    ..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots
    .. .. ..@ cellcentre.offset: Named num [1:2] 570927 9553723
    .. .. .. ..- attr(
    , "names")= chr [1:2] "x" "y"
    .. .. ..@ cellsize : num [1:2] 3.35 3.35
    .. .. ..@ cells.dim : int [1:2] 386 218
    ..@ bbox : num [1:2, 1:2] 570925 9553721 572218 9554451
    .. ..- attr(*, "dimnames")=List of 2
    .. .. .. : chr [1:2] "x" "y" .. .. .. : chr [1:2] "min" "max"
    ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
    .. .. ..@ projargs: chr "+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs"
    Warning: [D:\Academic\cleanscript\geomod\R\geomod.R:1] @title Missing name
    Warning: [D:\Academic\cleanscript\geomod\R\geomod.R:1] @title Missing name
    -- Building -------------------------------------------- geomod --
    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 'D:\Academic\cleanscript\geomod/DESCRIPTION' (413ms)

  • preparing 'geomod':
    v checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'geomod_0.1.0.tar.gz'

-- Checking -------------------------------------------- geomod --
Setting env vars:

  • R_CHECK_CRAN_INCOMING_USE_ASPELL: TRUE
  • 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 'D:/Academic/cleanscript/geomod.Rcheck' (639ms)
  • using R version 3.6.3 (2020-02-29)
  • using platform: x86_64-w64-mingw32 (64-bit)
  • using session charset: ISO8859-1
  • using options '--no-manual --as-cran'
    v checking for file 'geomod/DESCRIPTION' ...
  • checking extension type ... Package
  • this is package 'geomod' version '0.1.0'
  • package encoding: UTF-8
    v checking package namespace information
    v checking package dependencies (7.1s)
    v checking if this is a source package ...
    v checking if there is a namespace
    v checking for executable files (901ms)
    v checking for hidden files and directories ...
    v checking for portable file names ...
    v checking whether package 'geomod' can be installed (25.1s)
    v checking installed package size (731ms)
    v checking package directory (815ms)
    v checking for future file timestamps (1.1s)
    v checking DESCRIPTION meta-information (464ms)
    v checking top-level files ...
    v checking for left-over files ...
    v checking index information
    v checking package subdirectories ...
    v checking R files for non-ASCII characters ...
    v checking R files for syntax errors ...
    v checking whether the package can be loaded (2.8s)
    v checking whether the package can be loaded with stated dependencies (2.8s)
    v checking whether the package can be unloaded cleanly (2.8s)
    v checking whether the namespace can be loaded with stated dependencies (2.7s)
    v checking whether the namespace can be unloaded cleanly (2.8s)
    v checking loading without being on the library search path (3.8s)
    v checking dependencies in R code (2.9s)
    v checking S3 generic/method consistency (4.1s)
    v checking replacement functions (6.4s)
    v checking foreign function calls (4.1s)
    v checking R code for possible problems (11.8s)
    v checking Rd files (423ms)
    v checking Rd metadata ...
    v checking Rd line widths ...
    v checking Rd cross-references (426ms)
    v checking for missing documentation entries (3.2s)
    v checking for code/documentation mismatches (9s)
    v checking Rd \usage sections (4.7s)
    v checking Rd contents ...
    v checking for unstated dependencies in examples ...
  • checking examples ... NONE (399ms)
    v checking for unstated dependencies in 'tests' ...
  • checking tests ...
    v Running 'testthat.R' (3.6s)
    v checking for detritus in the temp directory (3.7s)

-- R CMD check results --------------------------------------- geomod 0.1.0 ----
Duration: 1m 48.9s

0 errors v | 0 warnings v | 0 notes v

R CMD check succeeded

:wave: hello!

What error is there in the log you copy-pasted?

1 Like

Thank you for your quick response. I'm not sure exactly what the error is but every time I try to submit the package to CRAN for publishing I get a notification that there is an error or a warning message as below;

Dear package maintainer,

this notification has been generated automatically.
Your package geomod_0.1.0.tar.gz has been built (if working) and checked for Windows.
Please check the log files and (if working) the binary package at:
https://win-builder.r-project.org/goWS1GNFvfjW
The files will be removed after roughly 72 hours.
Installation time in seconds: 6
Check time in seconds: 19
Status: 1 ERROR, 1 NOTE
R version 4.0.0 beta (2020-04-15 r78231)

Oh! Are you using devtools::check_win()? So you mean the error is on Windows and you don't get it on your local OS? Could you copy-paste the ERROR and WARNING that you get by clicking on the link in the email (it expired so I can't see it).

Getting an error on a platform, say Windows, and not another one, say Mac, is not uncommon at all (and CRAN Windows builder might have different settings than your local machine if you use Windows), but to help you fix it forum readers need to know what the ERROR and WARNING are.

Maybe you can reproduce the error on R-hub Windows platforms. R-hub platforms are meant to mimick CRAN platforms as closely as possible. See intro to rhub.

Also sharing this: Resources around CRAN submission compiled by Isabella Velásquez

2 Likes

When I run devtools::check_win() the following error appears.

Error: 'check_win' is not an exported object from 'namespace:devtools'

What could I be doing incorrectly?

Sorry the functions are check_win_devel(), check_win_release() etc. But it was a question from me: how did you send your package to Winbuilder? The email you quote above is something you get after submitting a package to Winbuilder (which is a tool provided by CRAN, to check packages on Windows before you submit them to CRAN, where your package will be tested on several platforms included a very similar Windows platform).

I've just remembered I wrote a blog post about Winbuilder.

On 27/05/2020, 09:51, "ligges@statistik.tu-dortmund.de" <ligges@statistik.tu-dortmund.de> wrote:

Dear package maintainer,

this notification has been generated automatically.
Your package geomod_0.1.0.tar.gz has been built (if working) and checked for Windows.
Please check the log files and (if working) the binary package at:

https://win-builder.r-project.org/ntb28E6TB4AS
The files will be removed after roughly 72 hours.
Installation time in seconds: 8
Check time in seconds: 78
Status: 1 ERROR, 1 NOTE
R Under development (unstable) (2020-05-26 r78577)

All the best,
Uwe Ligges
(CRAN maintainer of binary packages for Windows

Thanks. The log tells you the error is in install.out where you can read about problems (warnings and error) in particular

Error in setwd("D:/Academic/cleanscript") 

cannot work on another machine than yours.

I'd recommend investigating warnings/ error from install.out, in particular removing that setwd. Good luck!

Thank you very much for the insightful help. Let me investigate install.out further before submitting the package. Thank you Maelle.

1 Like