r-pkgs | Building R packages | Build Tool library

 by   hadley R Version: oreilly-handover License: Non-SPDX

kandi X-RAY | r-pkgs Summary

kandi X-RAY | r-pkgs Summary

r-pkgs is a R library typically used in Utilities, Build Tool applications. r-pkgs has no bugs, it has no vulnerabilities and it has low support. However r-pkgs has a Non-SPDX License. You can download it from GitHub.

Building R packages
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              r-pkgs has a low active ecosystem.
              It has 734 star(s) with 575 fork(s). There are 39 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 10 open issues and 330 have been closed. On average issues are closed in 171 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of r-pkgs is oreilly-handover

            kandi-Quality Quality

              r-pkgs has no bugs reported.

            kandi-Security Security

              r-pkgs has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              r-pkgs has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              r-pkgs releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of r-pkgs
            Get all kandi verified functions for this library.

            r-pkgs Key Features

            No Key Features are available at this moment for r-pkgs.

            r-pkgs Examples and Code Snippets

            No Code Snippets are available at this moment for r-pkgs.

            Community Discussions

            QUESTION

            Vignette in Package Documentation
            Asked 2021-Jun-08 at 02:55

            I wrote a vignette for an R package of mine. It is built without any errors, using both devtools::built() and the tool built into RStudio with the vignettes option selected. The html output file is placed in the vignettes directory, but it does not show up in the list printed by vignette(all = T) and the User guides, package vignettes and other documentation link is not added to the documentation.

            As recommended on this site, I already reinstalled the package using devtools::install(), made sure that the directory is called vignettes, and checked whether the vignettes were excluded in .Rbuildignore (it contains ^.*\.Rproj$ and ^\.Rproj\.user$).

            This is the (anonymized) header of the Rmd file:

            ...

            ANSWER

            Answered 2021-May-24 at 10:15

            I have a solution, from here. You need to force installation of the vignette when installing your package.

            Example with local package :

            Source https://stackoverflow.com/questions/67664087

            QUESTION

            Datasets not exported/available from my R package
            Asked 2020-Dec-18 at 18:46

            Following advice about NAMESPACE and External Data formatting/setup, I have:

            A. My data files in mypackage/data/datafilename.RData

            B. The data script as mypackage/R/data.R with data files individually named and described within that one file, having just changed "itemize" to "describe" and changing the format of those item lines:

            C. I've document()-ed this, commit-pushed to github, and install_github reinstalled locally.

            Help for the data files works:

            But I can't access those data, whereas I can access data in other packages using the same method:

            Can anyone think why this would be? NAMESPACE doesn't include these as exports:

            But it's autogenerated by document() so that's arguably out of my control. By comparison, mapplots' NAMESPACE has exportPattern(".")

            Environment for the package also doesn't include them, but I don't know if this is expected or not, based on lazy loading (which is true):

            Any ideas welcome. I've tried data(gbm.auto:grids) with 1, 2 & 3 colons, to no avail. Based on the answer to this related question (also by me), I get the suspicion that there might be some issue whereby only the last named object in data.R is important/accessible?

            usethis has been created since I've been updating this package and has use_data and create_package but I'm reluctant to try these out since ostensibly everything in my package should already be in order and I don't want to make things worse.

            Thanks in advance. Reprex would be

            ...

            ANSWER

            Answered 2020-Dec-18 at 18:46

            Data files in data must have .RData extensions, not .Rdata

            Bug filed here.

            Source https://stackoverflow.com/questions/65333062

            QUESTION

            Error when building Vignette - R package development
            Asked 2020-Oct-26 at 08:46

            My apologies in advance if this is an obvious question but I have searched both stack overflow and what have been otherwise very useful resources like R packages by Hadley Wickham or this blog and can not find an answer.

            My issue occurs when trying to run build_vignettes() on my developed R package (myPackage). The vignette for the package (myPackage.Rmd) will create as expected using knit in RStudio but when I run build_vignettes(), I get the following error:

            ...

            ANSWER

            Answered 2020-Oct-25 at 22:34

            I solved the second error you get updating packages devtools and usethis.

            Source https://stackoverflow.com/questions/64354871

            QUESTION

            Why does testthat 2.3.2 use a different sort()
            Asked 2020-Sep-17 at 09:20

            (This question is also asked at Github here)

            After an upgrade of R to 4.0.2 tests fail because it seems, the algorithm of sort in testthat changed. The following shows, that base::sort() and browser() are fine in R 4.0.2 (See this question, why this check is added.):

            ...

            ANSWER

            Answered 2020-Sep-17 at 09:20

            Cross-platform reproducibility is more imprtant. Setting the collation to C makes sure, tests give the same result across all platforms.

            Options to deal with this change if sort caused the problems (sort depends on the collation)** you have at least 3 different options:

            1. The use of stringr::sort(): New dependence on stringr package

            2. Customize your function without additional packages

            Source https://stackoverflow.com/questions/63336729

            QUESTION

            What is the best practice for transferring objects across RStudio projects?
            Asked 2020-Aug-20 at 23:11

            I would like to use R objects (e.g., cleaned data) generated in one RStudio project in another RStudio project.

            Specifically, I have multiple RStudio projects (that hold drake plans) that do various things for my thesis experiments (e.g., generate materials, import and clean data, generate reports/articles). I want to import objects (mainly data and materials) that I generated in these projects into another RStudio project that generates my thesis report. It seems to make sense to keep the individual experiments as separate projects (with separate git repositories) because they each have so many components.

            At the moment I can see three ways of doing this:

            1. Re-create the data cleaning process
              • But: this involves copy/paste, which I'd like to avoid, especially if things change upstream.
            2. Access the relevant scripts/functions by changing the working directory
              • But: even if I used here it seems that this would introduce poor reproducibility.
            3. Make the source projects into packages and make the objects I want to "export" into exported data (as per the data section of Hadley's R packages guide)

            Is there any other way of doing this?

            ...

            ANSWER

            Answered 2020-Aug-20 at 13:56

            My first recommendation is to use a single drake plan to unite the stages of the overall project that need to share data. drake is designed to handle a lot of moving parts this way, and it will be more seamless when it comes to drake's decisions about what to rerun downstream. But if you really do need different plans in different sub-projects that share data, you can track each shared dataset as a file_out() file in one plan and track it with file_in() in another plan.

            Source https://stackoverflow.com/questions/63499961

            QUESTION

            R package with C code, 'no such symbol' in package dll
            Asked 2020-Aug-20 at 09:41

            I am writing an R package, and started to include C code in it. Following instructions from here, under "getting started with .C()", I created a c function in src/, and an r wrapper to it, linking via the roxygen tag @useDynLib(, ).

            However, after running devtools::document(), I get the following error:

            ...

            ANSWER

            Answered 2020-Aug-20 at 09:41

            It turns out that the problem is in this line

            Source https://stackoverflow.com/questions/63490814

            QUESTION

            How to export functions as S3 methods in my R package?
            Asked 2020-Aug-03 at 23:36

            I am writing a package for my use. I created objects of class marco, say.

            Then I wrote some methods, like print.marco, plot.marco, etc, which I would like to be applied with print(obj) where class(obj) = "marco". In the NAMESPACE file (created with roxygen2::document()), these functions are simply exported as such and not as S3methodand are not recognized as such by sloop::is_s3_method.

            I searched the internet and I can't find an answer or clear example. Following In Hadley Wickham's R packages in my R script I simply document the functions adding #' @export print.marco, etc.

            A minimal example

            ...

            ANSWER

            Answered 2020-Aug-03 at 23:36

            So, the answer was that i was using the wrong @export directive.

            I used @export print.marco. This overrides the creation of S3 methods. Putting simply @export works fine. Thanks to Roland for his comments above.

            Source https://stackoverflow.com/questions/63111973

            QUESTION

            How to documenting datasets for a r-package?
            Asked 2020-Jun-20 at 20:27

            I'm trying documenting datasets for a r-package as here http://r-pkgs.had.co.nz/data.html#documenting-data. Each data consist in single vectors and I wrote in each data1.R something like this:

            ...

            ANSWER

            Answered 2020-Jun-20 at 20:27

            All package objects should be documented to avoid the warnings.
            You should launch :

            Source https://stackoverflow.com/questions/62490711

            QUESTION

            non standard file "data-raw" note on building/checking a package in R
            Asked 2020-May-22 at 10:45

            I get this warning

            ...

            ANSWER

            Answered 2020-May-22 at 10:45

            When used, data-raw should be added to .Rbuildignore. As explained in the Data section of Hadley's R-Packages book (also linked in the question)

            Often, the data you include in data/ is a cleaned up version of raw data you’ve gathered from elsewhere. I highly recommend taking the time to include the code used to do this in the source version of your package. This will make it easy for you to update or reproduce your version of the data. I suggest that you put this code in data-raw/. You don’t need it in the bundled version of your package, so also add it to .Rbuildignore. Do all this in one step with:

            Source https://stackoverflow.com/questions/41855970

            QUESTION

            Error in dyn.load(dllfile) -- problem with building a package linking to Rcpp
            Asked 2020-May-02 at 23:07

            My package will not install, either on my machine or on travis-ci.org. The only update from the version on CRAN is that I added a vignette. I have been following the examples of Rcpp - package and R-packages; compiled code.

            The error is related to these prior questions but not a duplicate.

            1. Q40922814 -- problem here was the use of both C and C++ code. I only use C++ code
            2. Q36952571 -- I'm on Mac OS, so no access to ldconfig, though perhaps my problem is related.
            Error:

            from the package directory:

            ...

            ANSWER

            Answered 2020-May-02 at 23:07

            I think, based on a quick poke, that your package is borked.

            The install step fails on

            Source https://stackoverflow.com/questions/61566775

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install r-pkgs

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/hadley/r-pkgs.git

          • CLI

            gh repo clone hadley/r-pkgs

          • sshUrl

            git@github.com:hadley/r-pkgs.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link