[R-pkg-devel] CRAN submission struggle

Christiaan Pieterse p|et|e@cjp@1908 @end|ng |rom gm@||@com
Sun Dec 17 14:29:34 CET 2023


Hi, thank you for all the responses.

I have uploaded the previous package to GitHub, available at:
https://github.com/WoutersResearchGroup/R-IO-PS . Note that this works when
installed via GitHub using devtools, but is a bit messy. Hence I decided to
start over for CRAN release. If you can help me to get this uploaded to
cran it would be awesome!

But, I've uploaded the newly created package as discussed in my first
email, available at: https://github.com/ChristiaanPieterse/iopspackage2.1.0
This doesn't have a readme. See the readme at the first link above.

Here are the Errors, Warnings and Notes from the check:

* checking CRAN incoming feasibility ... [25s] NOTE
Maintainer: 'C.J Pieterse <pietie.cjp.1908 using gmail.com>'
New submission
Unknown, possibly misspelled, fields in DESCRIPTION:
  'Exports'

* checking whether package 'iopspackage' can be installed ... [27s] WARNING
Found the following significant warnings:
  Warning: package 'Rcpp' was built under R version 4.3.2

* checking dependencies in R code ... NOTE
Namespaces in Imports field not imported from:
  'openxlsx' 'roxygen2' 'tibble'
  All declared Imports should be used.

* checking R code for possible problems ... [12s] NOTE
IOPS: no visible global function definition for 'createWorkbook'
IOPS: no visible global function definition for 'addWorksheet'
IOPS: no visible global function definition for 'writeData'
IOPS: no visible global function definition for 'saveWorkbook'
Undefined global functions or variables:
  addWorksheet createWorkbook saveWorkbook writeData

* checking examples ... ERROR
Running examples in 'iopspackage-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: IOPS
> ### Title: IOPS
> ### Aliases: IOPS
>
> ### ** Examples
>
>
> # Load the example data
> data(ExampleTradeData)
Warning in data(ExampleTradeData) :
  data set 'ExampleTradeData' not found
>
> oldwd <- getwd()
> temp_dir <- tempdir()
>
> # Set the working directory to a temporary directory
> setwd(temp_dir)
>
> # Then use it in your function
> IOPS(
+   CountryCode = 710,
+   tradeData = ExampleTradeData,
+   ComplexMethod = "reflections",
+   iterCompl = 5,
+   GVCMapping = NULL,
+   tradedigit = 6
+ )
Selected country: ZAF
Error: object 'ExampleTradeData' not found
Execution halted

* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
  'lastMiKTeXException'

I've struggled for a while with the error on my example that doesn't want
to run. I'd like to know if I've uploaded the ExampleTradeDate correctly as
seen in the inst/extdata file. I was also told previously to create a
temporary directory for the function output and delete the temporary
directory after the example, but I'm unsure if I did it correctly.

Thank you for the assistance
Christiaan

On Sat, 16 Dec 2023 at 20:07, Ivan Krylov <krylov.r00t using gmail.com> wrote:

> On Sat, 16 Dec 2023 19:41:16 +0200
> Christiaan Pieterse <pietie.cjp.1908 using gmail.com> wrote:
>
> > This .R file contained the Roxygen2 comments. (I was very unsure what
> > comments to include in this so it might be wrong, I'm unsure)
>
> If you like roxygen2 and would like to keep using it, you're welcome to
> keep the roxygen2 comments in your R files. Just don't forget to re-run
> roxygenise() every time you update them.
>
> >    3. Included a DESCRIPTION file is the 'iopspackage' folder. (Once
> > again I was very unsure what to include in this file so it might be
> > wrong).
>
> Does it help to follow the guide at
> <https://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file>?
> Start with the mandatory fields Package, Version, License,
> Description, Title and Authors using R (to generate Author: and Maintainer:
> from).
>
> >    8. I checked the tar file using *R CMD check --as-cran
> >    "iopspackage_2.1.0.tar.gz". *This yielded errors, warnings and
> > notes which I don't know how to solve and suspect are due to me
> > setting the file up wrong.
>
> Can you show us the log from the check? It should be fine to copy &
> paste the entries that don't say OK (i.e. NOTEs, WARNINGs, and ERRORs).
>
> Most of what you'll need to fix is described in "Writing R Extensions"
> (link above) and the CRAN policy at
> <https://cran.r-project.org/web/packages/policies.html>.
>
> > I've been told before not to include my package as an attachment, so
> > can someone please help me with the submission process?
>
> Can you publish the code anywhere? Ideally, this place should provide
> instant access to the latest version of every source code file inside
> your package. The most popular option nowadays is GitHub, but it does
> not have to be GitHub. Two GDPR-friendly alternatives are Codeberg and
> SourceHut. If you don't like Git (which does take effort to learn),
> there's R-Forge and Chiselapp.com. If you don't want to learn software
> version control right now, any free web/file hosting will suffice as
> long as you keep the files updated and accessible.
>
> > It is a 10mb file
>
> I think we've discussed this before. A 10-megabyte package mostly
> consisting of example data is not a good fit for CRAN. It's possible to
> use free Web hosting services to distribute data packages (see the
> 'drat' package and the function tools::writePACKAGES) separate from the
> CRAN package that should mainly contain the code.
>
> --
> Best regards,
> Ivan
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list