Submission of package to CRAN: problem grasping an Error

gianmarco

TS Contributor
#1
Hello,

I have submitted an R package to CRAN; the package is quite small, as it features just one function and three toy datasets.
Before submitting to CRAN for evaluation, I have run a check within RStudio (hitting the 'check' button), and fortunately I got no error nor warnings nor notes.

I have just received an email from the CRAN guys, who informs me that the package "does not pass the incoming checks automatically"; the problem is with the Windows and Debian checks.

I am at loss of understanding the error message they got:
** running examples for arch 'i386' ... ERROR
Running examples in 'movecost-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: movecost
> ### Title: R function for calculating accumulated cost of movement across
> ### the terrain and least-cost paths from an origin
> ### Aliases: movecost
> ### Keywords: accumulated cost
>
> ### ** Examples
>
> # load a sample Digital Terrain Model
> data(volc)
> # load a sample start location on the above DTM
> data(volc.loc)
> # load the sample destination locations on the above DTM
> data(destin_loc)
>
> # calculate walking-time isochrones based on the on-path Tobler's hiking function,
> # setting the time unit to hours and the breaks (isochrones interval) to 0.05 hour;
> # also, since destination locations are provided,
> # least-cost paths from the origin to the destination locations will be calculated
> # and plotted
> res <- movecost(dtm=volc,origin=volc.loc,destin=destin_loc,funct="t",time="h",breaks=0.05)
Error in .local(.Object, ...) :
Calls: movecost ... <Anonymous> -> new -> initialize -> initialize -> .local -> .Call

Execution halted
I do understand that the error crops out when testing the @examples section of the function's code; but I do not understand the bit in BOLD. Without grasping that, I have problem in locating and fixing the error.

Does anyone have a clue?


Best
Gm
 

trinker

ggplot2orBust
#2
@giam
Hello,

I have submitted an R package to CRAN; the package is quite small, as it features just one function and three toy datasets.
Before submitting to CRAN for evaluation, I have run a check within RStudio (hitting the 'check' button), and fortunately I got no error nor warnings nor notes.

I have just received an email from the CRAN guys, who informs me that the package "does not pass the incoming checks automatically"; the problem is with the Windows and Debian checks.

I am at loss of understanding the error message they got:


I do understand that the error crops out when testing the @examples section of the function's code; but I do not understand the bit in BOLD. Without grasping that, I have problem in locating and fixing the error.

Does anyone have a clue?


Best
Gm
Did you ever solve this?
 

gianmarco

TS Contributor
#4
@trinker:
Thanks for asking. As a matter of fact, eventually I managed to solve the issue and to push the package on CRAN. But I cannot remember how I fixed the error.

If I am not mistaken, the problem was with the dataset which the function was using in the example. I recall using a dataset out from another package instead. That, as far as I recall, solved the issue.

Best
Gm
 

trinker

ggplot2orBust
#5
Cool. I have had a summer dedicated to family so haven't spent time coding or watching the forums. With the wife and kids back to school I'm back and saw this thread. Glad to hear it has been solved.