shellpipes

An R package for working through Makefile and command lines. Designed to be used with pipeR.mk (part of makestuff).

The shellpipes code is here (the back end of the repo that hosts this page).

Installation

From inside R:

remotes::install_github("dushoff/shellpipes")

This will fail for old versions of remotes (before 2.2.0), because the default branch is now “main” instead of “master”. Adding , ref="main" before the last parenthesis may fix this problem, but you should probably update remotes instead:

install.packages("remotes")

… and then try again.

Alternative If you can’t install_github because of permission problems, try:

Overview

shellpipes is designed to:

shellpipes functions work with a list of filenames that can be specified manually, but is typically specified by either:

The idea is that shellpipes expects to read from files in the filename list, and to write to files with the same basename as the target. pipeR.mk recognizes that .Rout files are made using a shellpipe-friendly call, and that .rda, .rds, .Rout.* and other sorts of files are made as side-effects of .Rout.

A few example functions are listed below. Please see documentation from installed package (BB: feel free to tell me what’s the recommended way to put documentation online).

Setup

library(shellpipes) ## to load the package
startGraphics() ## not strictly necessary, but good practice; can also be used to set height and width
## startGraphics() does not do anything in interactive mode unless you over-ride a switch; it's meant to play nicely with interactive users

Reading files

Saving files