MyNixOS website logo
Description

Miscellaneous Tools for Reproducible Research.

Tools to load 'R' packages and automatically generate BibTeX files citing them as well as load and cache plain-text and 'Excel' formatted data stored on 'GitHub', and from other sources.

repmis

Version 0.4.5 CRAN Version Build Status CRAN Monthly Downloads CRAN Total Downloads

Miscellaneous tools for reproducible research

Functions

repmis currently has the following functions:

Functions for installing, loading, and citing R packages:

  • LoadandCite: a function for installing and loading R packages. The command also creates a BibTeX bibliography file with package citations.

  • InstallOldPackages: installs specific R package versions.

Functions for loading data into R from the internet:

  • source_data: loads plain-text formatted data (e.g. CSV, TSV) or RDATA stored at a URL (both http and https) into R. Note: the command can download data from almost any secure (https) URL. This includes data in Dropbox Public folders and published Google Docs plain-text formatted data sets (see Google Docs support pages for details. Note, currently only the old Google Sheets supports publishing sheets to the Web as plain-text files.)

    • source_data, and all of the data download commands in repmis find and report SHA-1 hashes for each file it loads. You can use a file's SHA-1 hash to make sure you are downloading the file and version of the file you think you are downloading. Note: if you are using source_data to download data from GitHub, source_data's SHA-1 hash is not the same as the Git commit's SHA-1 hash. (Thanks to Hadley Wickham's devtools package for the code to make this possible.)

    • Data downloaded with source_data can be cached (so you don't have to re-download it every time you run a script. To do this use the cache argument.

  • source_XlsxData: downloads and loads a data set in Excel format. The function relies on the xlsx package and can take any arguments that read.xlsx can.

Other

  • git_stamp: function for get git stamp (commit and branch) for a repository. Thanks to Måns Magnusson.

  • scan_https: read a character text file from a secure (https) site into R as a single object.

  • set_valid_wd: sets valid working directory from vector of possible directories. This is useful if you run the same script on multiple machines.

Installation

The package is available for download from CRAN.

You can also download the most recent version using the devtools command install_github to install repmis in R. Here is the exact code for installing the current version:

devtools::install_github('christophergandrud/repmis')
Metadata

Version

0.5

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows