Description Usage Functions Functions Author(s)
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.
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)
|
NumberOfDays: Counts days in a month
StripDegMinSec: Strips deg-min-sec vectors to 'numeric' char vector.
UnlistDate: Unlists a list of 'Date' objects w/o coercion to numeric.
PullFilenameDates: Generates a date vector from filenames.
LoopStatus: Prints loop progress.
SnipSingleCharacter: Snips one character from each element of a character vector
Multiplot: Multiple ggplot panel
'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.
Brandon McNellis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.