[R-pkg-devel] Submit second version of R package to CRAN
I am updating the version of an R package I submitted last year on CRAN and came across one question that I would be grateful to seek any input about: I have never submitted an updated version of a package to CRAN. I am considering following a similar process to what I did to submit my original version of the package to CRAN. That is, I plan to use devtools::release() and include a note in a file called cran-comments.md to indicate that this is not an original version submission, but rather, an updated version submission. I found this advice on Hadley Wickham's site ( http://r-pkgs.had.co.nz/release.html), although it was recommended for first-time submission, and I was not sure whether this advice could extend to update submissions as well. Thank you for any advice!... L. [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Submit second version of R package to CRAN
Thank you both for your help! On Mon, Jun 6, 2016 at 5:39 PM, Hadley Wickham wrote: > On Sun, Jun 5, 2016 at 1:53 AM, Uwe Ligges > wrote: > > I do not know devtools: > > If it worked for you for the initial submission and the CRAN team did not > > complain, please resubmit in the same way - and keep in mind you want to > > check the package in advance using a very recent version of R. > > And since you do use devtools, the easiest way to do that is to run > devtools::build_win() which builds the package and sends it to the > excellent win-buider service run by Uwe. You'll get an email 10-20 > minutes later with the results of the checks. > > Hadley > > -- > http://hadley.nz > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] .gitkeep file to prevent folder from erasing when empty
Hello everyone: I am working on a vignette for a package that outputs reports for users. As part of the vignette, users can manually run eval=FALSE code that creates example reports. These example reports that they create can be saved to an output folder within extdata (extdata/OutputFolder). When I submit to CRAN, I will be sure that OutputFolder is empty. However, whenever I make it empty, the entire folder disappears. To combat this problem, I have placed a .gitkeep file within the OutputFolder. I *believe* the presence of the .gitkeep file works as intended (prevents the automatic removal of the OutputFolder when empty). However, upon running check(), I receive a note: *checking for hidden files and directories ... NOTE* *Found the following hidden files and directories:* * inst/extdata/OutputFiles/.gitkeep* *These were most likely included in error. See section ‘Package* *structure’ in the ‘Writing R Extensions’ manual.* Does anyone have advice on how to effectively remove this note? Otherwise, does my rationale above seem like a reasonable purpose for keeping the note? Thank you for helping me approach this! [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] .gitkeep file to prevent folder from erasing when empty
Hello everyone: Thank you for the helpful suggestions! I moved the directory name to the .Rbuildignore file, as Johannes suggested. Uwe, thanks for bringing up that topic! Yes, I read that we cannot automatically write files to user's filespace (outside of tempdir()). So, there is nothing in our package that will automatically write to user's filespace. However, we do allow users to manually enter the suggested path when going over examples in the vignette (which is the extdata/OutputFolder) . We did not think about if users cannot have write access to that folder. However, that will not render the package useless for them. Instead, they can manually enter an output folder pathway that works for them, and follow the vignette examples that way. The presence of the extdata/OutputFolder is just recommended for simplicity with following examples (and if write available for users). Thanks again! On Mon, Oct 3, 2016 at 2:25 AM, Uwe Ligges wrote: > > > On 03.10.2016 08:13, Johannes Ranke wrote: > >> Hi, >> >> You can include the .gitkeep file in .Rbuildignore. This will prevent it >> from >> being present in the package you test or submit, but git willl still see >> it >> and keep the directory. >> >> Johannes >> >> Am Montag, 3. Oktober 2016, 00:03:33 schrieb Luck Buttered: >> >>> Hello everyone: >>> >>> I am working on a vignette for a package that outputs reports for users. >>> As >>> part of the vignette, users can manually run eval=FALSE code that creates >>> example reports. These example reports that they create can be saved to >>> an >>> output folder within extdata (extdata/OutputFolder). >>> >> > > Note that this is a bad idea. > Your users may not have write access to that folder, e.g. for network > wiede installation as the one at my department. > Also, you have to ask users (por let them enter a path or file) before > writing somewhere on the filespace if not tempdir(). > > Best, > Uwe Ligges > > > > > >>> When I submit to CRAN, I will be sure that OutputFolder is empty. >>> However, >>> whenever I make it empty, the entire folder disappears. To combat this >>> problem, I have placed a .gitkeep file within the OutputFolder. >>> >>> I *believe* the presence of the .gitkeep file works as intended (prevents >>> the automatic removal of the OutputFolder when empty). However, upon >>> running check(), I receive a note: >>> >>> *checking for hidden files and directories ... NOTE* >>> *Found the following hidden files and directories:* >>> * inst/extdata/OutputFiles/.gitkeep* >>> *These were most likely included in error. See section ‘Package* >>> *structure’ in the ‘Writing R Extensions’ manual.* >>> >>> Does anyone have advice on how to effectively remove this note? >>> Otherwise, >>> does my rationale above seem like a reasonable purpose for keeping the >>> note? >>> >>> Thank you for helping me approach this! >>> >>> [[alternative HTML version deleted]] >>> >>> __ >>> R-package-devel@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel >>> >> > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] .gitkeep file to prevent folder from erasing when empty
Hello everyone: Inside .Rbuildignore, I put the following line: ^OutputFolder$ However, I notice that the extdata/OutputFolder still disappears if there are no files inside of it. (I am thinking this happens when I push changes to Github). I am trying to keep the extdata/OutputFolder present (whether or not it has files inside of it) for both github and when I submit the package. Thanks again for any input you may have! On Mon, Oct 3, 2016 at 8:15 AM, Luck Buttered wrote: > Hello everyone: > > Thank you for the helpful suggestions! > > I moved the directory name to the .Rbuildignore file, as Johannes > suggested. > > Uwe, thanks for bringing up that topic! Yes, I read that we cannot > automatically write files to user's filespace (outside of tempdir()). So, > there is nothing in our package that will automatically write to user's > filespace. However, we do allow users to manually enter the suggested path > when going over examples in the vignette (which is the > extdata/OutputFolder). > > We did not think about if users cannot have write access to that folder. > However, that will not render the package useless for them. Instead, they > can manually enter an output folder pathway that works for them, and follow > the vignette examples that way. The presence of the extdata/OutputFolder > is just recommended for simplicity with following examples (and if write > available for users). > > Thanks again! > > On Mon, Oct 3, 2016 at 2:25 AM, Uwe Ligges de> wrote: > >> >> >> On 03.10.2016 08:13, Johannes Ranke wrote: >> >>> Hi, >>> >>> You can include the .gitkeep file in .Rbuildignore. This will prevent it >>> from >>> being present in the package you test or submit, but git willl still see >>> it >>> and keep the directory. >>> >>> Johannes >>> >>> Am Montag, 3. Oktober 2016, 00:03:33 schrieb Luck Buttered: >>> >>>> Hello everyone: >>>> >>>> I am working on a vignette for a package that outputs reports for >>>> users. As >>>> part of the vignette, users can manually run eval=FALSE code that >>>> creates >>>> example reports. These example reports that they create can be saved to >>>> an >>>> output folder within extdata (extdata/OutputFolder). >>>> >>> >> >> Note that this is a bad idea. >> Your users may not have write access to that folder, e.g. for network >> wiede installation as the one at my department. >> Also, you have to ask users (por let them enter a path or file) before >> writing somewhere on the filespace if not tempdir(). >> >> Best, >> Uwe Ligges >> >> >> >> >> >>>> When I submit to CRAN, I will be sure that OutputFolder is empty. >>>> However, >>>> whenever I make it empty, the entire folder disappears. To combat this >>>> problem, I have placed a .gitkeep file within the OutputFolder. >>>> >>>> I *believe* the presence of the .gitkeep file works as intended >>>> (prevents >>>> the automatic removal of the OutputFolder when empty). However, upon >>>> running check(), I receive a note: >>>> >>>> *checking for hidden files and directories ... NOTE* >>>> *Found the following hidden files and directories:* >>>> * inst/extdata/OutputFiles/.gitkeep* >>>> *These were most likely included in error. See section ‘Package* >>>> *structure’ in the ‘Writing R Extensions’ manual.* >>>> >>>> Does anyone have advice on how to effectively remove this note? >>>> Otherwise, >>>> does my rationale above seem like a reasonable purpose for keeping the >>>> note? >>>> >>>> Thank you for helping me approach this! >>>> >>>> [[alternative HTML version deleted]] >>>> >>>> __ >>>> R-package-devel@r-project.org mailing list >>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel >>>> >>> >> __ >> R-package-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-package-devel >> > > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Note and warning about subdirectory sizes
Hi all, Thank you for your help. The only original question I am still a bit stuck on is #3. I read a lot about the command today, and tried several approaches, but am unsure how to remove that warning. * checking sizes of PDF files under ‘inst/doc’ ... WARNING ‘gs+qpdf’ made some significant size reductions: compacted ‘ePort.pdf’ from 1655Kb to 1076Kb consider running tools::compactPDF(gs_quality = "ebook") on these files I work on a Mac with both RStudio and terminal (can do either). In either RStudio or terminal, I could run the command: compactPDF("inst/doc", qpdf = Sys.which(Sys.getenv("R_QPDF", "qpdf")), gs_quality = "ebook") I would not get any output from that. And when I then run: check() I noticed the WARNING was still there. I also ran: R CMD build --compact-vignettes=gs But then when I ran check(), I still noticed the WARNING. I also ran: build(compact-vignettes("gs+qpdf")) which gave me the error: Error in inherits(x, "package") : object 'compact' not found I tried a few other syntax I found online, but they mostly gave me warnings. So, what I would love for any advice/input on, is what I can do to remove that WARNING (if I must)? I am not sure if I am running commands incorrectly, running in the wrong folder, should be using command/Rstudio, etc. Even reading advice online and looking at the documentation of build and compactPDF is not solving this for me (and it may be due to my inexperience with R and terminal). Thanks again for any help!!! On Sun, Oct 2, 2016 at 3:43 PM, Duncan Murdoch wrote: > On 02/10/2016 4:05 PM, S johnson wrote: >> >> Hi all, >> >> I am running check() on an R package, and receive one note and one warning >> (seem to be related): >> >> * checking installed package size ... NOTE >> installed size is 25.9Mb >> sub-directories of 1Mb or more: >> >> doc 3.4Mb >> extdata 22.1Mb >> >> * checking sizes of PDF files under ‘inst/doc’ ... WARNING >> ‘gs+qpdf’ made some significant size reductions: >> compacted ‘ePort.pdf’ from 1655Kb to 1076Kb >> consider running tools::compactPDF(gs_quality = "ebook") on these files >> >> After pondering this note, I have three brief questions as follows, >> >> 1) When I run "du -hs" on the doc sub-directory, it lists its size as >> only 10K. There is only one file inside the doc sub-directory, and >> similarly, when I run "du -hs" on that one file, it lists its size as >> only 10K. I wonder, then, why check() reports that this sub-directory >> called doc is 3.4 Mb? > > > You are probably looking at the package source; the measurements are made > after installation. At that point the vignettes have been copied into the > doc directory. > >> >> 2) My extdata sub-directory is rather large. It is certainly over 1Mb. >> This is due to a few dozen example images (.png files) that we feel is >> important to include in the package. In general, do notes like these >> prevent >> CRAN submission acceptance? If so, what would be an alternative? I >> imagine there were other packages that had extdata subdirectory with >> example components that are larger than 1Mb - and upon a Google search >> that seems to be the case. Still, I wanted to seek your input! > > > There isn't a hard and fast rule. If the data is necessary for the function > of the package, then it will be allowed. If it is not needed, then maybe > not. Often if the data is relatively stable but the code may be improved, > you'll be asked to put them in separate packages, so that CRAN doesn't fill > up with archived repetitions of the same data. > >> >> 3) I am unfamiliar with what I should consider running compactPDF() on. >> None of the files are PDF files. The doc sub-directory has one .R file, >> and >> the extdata sub-directory has .R files, .png files (taking up the most >> space), and .txt files. >> > > That message is likely talking about a vignette. See the help page > ?compactPDF for how to invoke it during a build. > > Duncan Murdoch > > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel