Re: [R-pkg-devel] Source code of an existing package
Hi, I always use metacran to access package sources. https://github.com/cran/boot Tim On 11.08.2016 06:57, Holger Hoefling wrote: Hi, If you are interested in the source code of an entire package in its original form - you can also download the .tar.gz version of the package from CRAN. In a .tar.gz, you find the sources, unlike the .zip for windows, which is already compiled. If you are under windows, you can use a program such as 7-zip to unzip the .tar.gz (which is mostly used on unix systems). The R code of the package is in the R subfolder In your case, the function boot.ci, is in R/bootfuns.q and starts in the latest version on line 859 Best Holger On Thu, Aug 11, 2016 at 3:42 AM, Marcelo Carvalho Fernandes < mcf2...@gmail.com> wrote: Hi all! I am interested in seeing the source code of the boot.ci() function of the boot package. Is it possible to have such source code? How? Thanks in advance, --- Marcelo Carvalho Fernandes __ 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 -- ##### Tim Appelhans Department of Geography Environmental Informatics Philipps Universität Marburg Deutschhausstraße 12 Raum 00A08 35032 Marburg (Paketpost: 35037 Marburg) Germany Tel +49 (0) 6421 28-25957 http://environmentalinformatics-marburg.de/ __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] What is the proper way to include README.Rmd generated png’s for package submission to CRAN?
I don't know if this is the proper way but if you host your package on github what you can do is add the image you want to be displayed in a 'inst' or 'docs' (in case you use pkgdown) folder push to github and then include a link to that image in README.md. This is how we do this in mapview https://github.com/r-spatial/mapview/blob/master/README.md which shows up fine on CRAN too https://cran.r-project.org/web/packages/mapview/README.html Best Tim On 22.05.2017 03:48, Sebastian Kopf wrote: Hi all, I’m stuck trying to figure out the appropriate way to include figures generated by a README.Rmd for package submission to CRAN. Any advice much appreciated. Here is the problem: - I generated an RMarkdown package README using `devtools::use_readme_rmd()`, leaving the chunk options intact (i.e. `fig.path=‘README-‘`) - I included basic instructions and links to the vignettes but would also like to include an example figure so I added a chunk in the README.Rmd that generates and correctly saves the resulting figure in README-example-1.png - The package passes `devtools::check(cran = TRUE)` without errors, warnings or notes but generates a warning on win-builder because of the figure with the following message: *Conversion of 'README.md' failed:pandoc.exe: Could not fetch README-example-1.pngREADME-example-1.png: openBinaryFile: does not exist (No such file or directory) * I understand that this is correct behavior because the file is of course explicitly excluded from the build (`^README-.*\.png$` in .Rbuildignore), and without this line in .Rbuildignore I would get a different warning that this png should indeed not be part of the build. What I could not figure out is how I should proceed with this so it passes win_builder. I checked how this is done in the ggplot2 GitHub repository (which also includes a figure in its README.md that is generated by a README.Rmd) and made sure my .Rbuildignore and other settings are all correct. I eventually realized that the README.html generated on CRAN for ggplot2 actually does not have the png included either ( https://cran.r-project.org/web/packages/ggplot2/README.html) so perhaps this is just not possible and I need to communicate to win_builder that it will indeed be missing this png in some way? Or perhaps I should just avoid having an example figure in the README altogether? Any help much appreciated, I apologize if this turns out to be a trivial question and there is some different way I should be generating the README for submission to CRAN. Best regards, Sebastian [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Tim Appelhans Research Specialist, Geomarketing GfK | Bamberger Str. 6, 90425 Nürnberg | Germany Postal address: Nordwestring 101 | 90419 Nürnberg __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel