gerhybrid.blogg.se

Creating an r package
Creating an r package






creating an r package

If you run devtools::check() again, now, your final line should report: Since we’re saying that our package will be using the MIT license, we need to ensure there’s an associated LICENSE file which we can do by executing usethis::use_mit_license() which will create the necessary files and ensure the License field in the DESCRIPTION file is formatted properly.

creating an r package

To prove this, use the R console to run devtools::check() and - after some rather verbose output - you’ll see the following lines at the end: > checking DESCRIPTION meta-information. Īt this point we still do not have a “perfect” R package.

creating an r package

The directory structure will look like this. # License: MIT + file LICENSE # Encoding: UTF-8 # LazyData: true # ✔ Writing 'NAMESPACE' # ✔ Writing 'myfirstpackage.Rproj' # ✔ Adding '.er' to '.gitignore' # ✔ Adding '^myfirstpackage\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore' # ✔ Opening '/Users/someuser/packages/myfirstpackage/' in new RStudio session # ✔ Setting active project to '' # (parsed): # * Bob Rudis () # Description: What the package does (one paragraph). Devtools :: create( "~/packages/myfirstpackage") # ✔ Creating '/Users/someuser/packages/myfirstpackage/' # ✔ Setting active project to '/Users/someuser/packages/myfirstpackage' # ✔ Creating 'R/' # ✔ Writing 'DESCRIPTION' # Package: myfirstpackage # Title: What the Package Does (One Line, Title Case) # Version: 0.








Creating an r package