Giter Site home page Giter Site logo

lookup's Introduction

lookup

Lookup R function definitions, including compiled code, S3 and S4 methods.

Travis-CI Build Status [Coverage Status](https://codecov.io/github/jimh ester/lookup?branch=master)

luke

Installation

# install.packages("devtools")
devtools::install_github("jimhester/lookup")

Example

Normal Functions (with compiled code)

Imgur

S3 generics and methods

Imgur

S4 generics and methods

Imgur

In RStudio IDE

Imgur

Setup

lookup makes heavy use of the GitHub API, which has a rate limit of 60 requests per hour when unauthenticated. You can create a Personal access token with no scope, which will increase your limit to 5000 requests per hour.

Once you have generated a token, add it to your ~/.Renviron file or shell startup file and it will be automatically used for further requests.

GITHUB_PAT=7d8d0436835d1baXYZ1234

gh::gh("/rate_limit") can be used to query your current usage and limits.

Default printing

lookup can be used as a complete replacement for function printing by attaching the package. To make this the default simply add this to your .Rprofile.

if (interactive()) {
  library(lookup)
}

How this works

If a base R function is printed that calls compiled code the code is lookup up using the R git mirror. If a CRAN package has compiled code it is looked up on the CRAN git mirror. If a package is installed with devtools::install_github() or devtools::install() the remote or local repository location is searched for the code.

This has been tested to work with .Internal, .External, .C, .Call and Rcpp calls.

Issues

This package uses a number of heuristics to find function definitions. This means it can fail in some cases, if you find a function that is not lookup up properly, please open an issue.

Thanks

lookup's People

Contributors

jimhester avatar

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.