Git Product home page Git Product logo

rpackage's Introduction

RPackage

Materials for writing an R Package

These are the materials associated with a one-hour workshop on writing an R Package.

A PDF of the presentation can be found here

There are many resources that the tutorial builds upon that are referenced in the presentation.

Briefly:

We created a package called "domR". It has 3 functions (dci, get_di_matrix, ttri) and 2 datasets (caribou, bonobos).

The tutorial takes you through:

  • setting up and naming a R package
  • adding .R function files
  • adding documentation to functions
  • adding data files
  • adding raw data files
  • adding documentation to data files
  • adding a vignette
  • building the package
  • running CRAN checks on the package
  • how to install the package locally
  • how to publish to GitHub or CRAN

The final package can be found in the domR folder.

The other files include example .R files that we may wanted to put into a package, and files that we could adapt for documentation etc.

Please contact me for more info via the issues tab or @jalapic on twitter.

rpackage's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.