bmcUtils: Spare utilities package

Description Usage Functions Functions Author(s)

Description

This is a odds-and-ends repository for generalized functions I use in developing other R packages or analyses. Sometimes other packages are required for functions to work, but I dont include them in the DESCRIPTION to make installation easier.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
NumberOfDays(date)

StripDegMinSec(x)

UnlistDate(x)

PullFilenameDates(fmt)

LoopStatus(from, to, big_inc = 1000, digits = 1)

SnipSingleCharacter(v, side = "front")

Multiplot(..., plotlist = NULL, file, cols = 1, layout = NULL)

Functions

Functions

'NumberOfDays' counts the days in a month. Input is an object of class 'date', and it will work for leap years etc.

'StripDegMinSec' will convert a lat/long degree-min-sec character vector to a 'numeric' character vector, where each character is three numeric values seperated by single spaces. This makes the vector usable by the 'conv_units' function in the 'measurements' package >= v. 1.2.0.

‘UnlistDate' will unlist a list of ’Date' objects without coercing them to numeric.

'PullFilenameDates' extracts dates of the given format from the current working directory. Assumes that the format doesn't include alphabetic characters.

'LoopStatus' prints the progress of a slow looop.

'SnipSingleCharacter' trims a character vector by 1 character for each vector element.

'Multiplot' plots multiple ggplots in the same window - its mostly copied verbatim from the R cookbook, link in the function source.

Author(s)

Brandon McNellis


bmcnellis/bmcUtils documentation built on May 16, 2019, 7:28 a.m.