Clone wiki

varhandle / Home

CRAN_Status_Badge CRAN Monthly Downloads CRAN Total Downloads Liberapay button

Intro

This page is the official/public wiki of my R package repository. To have control over this project and also protect my ideas, I develop the package in a private Bitbucket forked repository and update this public repo accordingly. This repository only contains the working non-beta branch of the code including nightly builds in case of minor changes due to malfunction or possible bug.

The best place to follow the package is here and the best place to get the package is CRAN.

About this package

This package is a collection of functions with the goal to help R usera work with variables easier safer and faster. All functions that are present in this package are written due to the need my colleagues and/or I felt for their existence, or they are some of my best practices that I wanted others to use in a systematic form.

List of functions in this package (Alphabetical order)

  • check.numeric
  • inspect.na
  • pin.na
  • rm.all.but
  • save.var
  • to.dummy
  • unfactor
  • var.info

Detail of each function can be found in the package's official documentation

Release notes of the package can be found in the following link: https://bitbucket.org/mehrad_mahmoudian/varhandle/wiki/Release%20notes

Installation

At every moment there can be at least one and at most two versions available. One version is the one that is in CRAN repository and the other one is the nightly-builds. The CRAN is always available and nightly-builds are only generated in case of an update that can not wait until the next CRAN publication date (You can not update your package very frequently due to CRAN regulations and the reviewers are sometimes cranky about some minor NOTEs during the package build).

Installation from CRAN

Simply go to your R environment and run the code below:

install.packages("varhandle")

Installation of the nightly-builds

First you should get the package file (.tar.gz) from this repository by navigating to the address below: https://bitbucket.org/mehrad_mahmoudian/varhandle/downloads

Then there are two simple ways, either you prefer to install the package in the R environment:

install.packages(path_to_file, repos = NULL, type="source")

or you prefer to install it just through your terminal without entering R environment (just replace the_package_file.tar.gz with the file you downloaded):

$ R CMD INSTALL the_package_file.tar.gz

Contribution

Any sort of contribution is highly welcome and it can be done in one of the following ways:

  1. By suggesting feature and reporting errors through the ticketing system

  2. By forking/cloning this repo, make your desire changes and send me a "pull request" so that I merge that feature in the package if it fits CRAN standards and my package's internal standards which are described below. In this case your name and your contribution type will be mentioned in the package.

$ git clone https://mehrad_mahmoudian@bitbucket.org/mehrad_mahmoudian/varhandle.git
  1. By forking/cloning this wiki and improve the text, examples and etc. (Detail info can be found blow in the corresponding section)
$ git clone https://mehrad_mahmoudian@bitbucket.org/mehrad_mahmoudian/varhandle.git/wiki

Internal Standards of this package

  1. The functions should be user friendly, meaning they should generate proper error, messages or plots
  2. User should have maximum control over the output
  3. Minimum usage of external packages (Base package and thin package are totally fine). For packages like stats and ggplot2 there should be a good reasoning why we need that since user should not be forced to install third-party package for utilizing this package.
  4. Code should be clear, meaning it should be properly commented and have proper (self explanatory) variable names should be used.
  5. The git commits' messages are better to follow simple instructions discussed in the following post to maintain git flow clarity: https://github.com/erlang/otp/wiki/Writing-good-commit-messages

Contribution to this Wiki

This wiki uses the Markdown syntax.

The wiki itself is actually a git repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.

Go ahead and try:

$ git clone https://mehrad_mahmoudian@bitbucket.org/mehrad_mahmoudian/varhandle.git/wiki

Wiki pages are normal files, with the .md extension. You can edit them locally, as well as creating new ones.

Syntax highlighting in Wiki

You can also highlight snippets of text (we use the excellent Pygments library).

Here's an example of some Python code:

test <- rnorm(20)
plot(test, type="l", col="blue")

You can check out the source of this page to see how that's done, and make sure to bookmark the vast library of Pygment lexers, we accept the 'short name' or the 'mimetype' of anything in there.

Have fun!

Updated