Collection of generic utility functions developed by William Stockhausen

addFilter | Add a file type to file extensions |

addQuotes | Add quotes to a character string vector. |

addTransparency | Add transparency to a vector of colors |

aggregateDataframe | Aggregate a dataframe according to "factor" levels. |

calcCIs | Compute confidence intervals from cv's or standard deviations |

calcPercentNonzero | Calculate percent non-zero occurrences from a set of... |

computeFunctionByFactors | Compute results using an arbitrary function on columns in a... |

computeStats | computeStats: Calculate count, mean, stdev, and cv of a... |

computeStats.dataframe | computeStats.dataframe: Calculate count, mean, stdev, and cv... |

computeStats.matrix | computeStats.matrix: Calculate count, mean, stdev, and cv of... |

computeStats.vector | Returns count, mean, stdev, and cv of vector x |

computeTickInterval | Calculate nice tick intervals for a scale. |

concatenateCSVs | Concatenate csv files into one. |

count | Returns count of x (ignoring NAs) |

createColorPalette | Create a color palette. |

createColorScale | Create a function defining a color scale. |

cvp | Calculate the cv (or std dev, if mean=0) of a vector. |

deleteCol | Delete column in a dataframe or matrix |

deleteCols | Delete columns in a dataframe or matrix |

doMenu | Create a menu of items |

dropNAs | Removes all rows from a dataframe based on columns that... |

first_difference | Calculate the first difference of a vector. |

formatZeros | formatZeros: replace blanks with 0's in printed numbers |

getCaptionsFromGGPlotList | Extract captions from list of plots in printGGList format |

getCSV | Open a csv file as a dataframe. |

getFactorLevels | Find the unique combination of levels of a set of "factors"... |

getFunctionName | Get the name of a function |

getIntervalLimits | Get interval limits (cut points) from a vector of midpoints |

getListElementPaths | Get paths to all terminal list elements as a character vector |

getOperatingSystem | Get the operating system name. |

keepCols | Keep columns from a dataframe |

mod | Calculate the modulus of two numbers |

my.lapply | my version of lapply |

parseDays | Convert character vector of dates to numeric vector of... |

parseMonths | Convert character vector of dates to numeric vector of... |

parseNum | Parse numeric expressions from a character vector. |

parseText | Parse text in character vector into individual elements by... |

parseYears | Convert character vector of dates to numeric vector of... |

pause | Pause R for a defined time |

printGGList | Print a ggplot2 object, or list of ggplot2 objects |

rebinColumn | Rebin a column in dataframe |

reclassify | Reclassify values in a vector. |

rootMedianSquare | Compute the root median square deviation (rmsd) of a vector |

selectFile | Select a file |

sortBy | sort a dataframe by row according to columns. |

standardize | Standardize a vector or columns in a dataframe by converting... |

standardize.vector | Standardize a vector by converting to z-scores. |

stripComments | Strip comments from elements of a character vector. |

stripQuotes | Strip quotes from a character string vector. |

Sum | Sum with NAs removed |

sumBy | Sum variables in a dataframe by a set of factor levels |

sumByDims | Sum array by specified dimensions |

trimByResiduals | Trim rows from a dataframe based on a vector of residuals. |

unstackDataframe | Unstack columns in a dataframe by a set of factor levels |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.