Learn R Programming

⚠️There's a newer version (1.0.6.2) of this package.Take me there.

taRifx (version 1.0.6)

Collection of utility and convenience functions.

Description

A collection of various utility and convenience functions.

Copy Link

Version

Install

install.packages('taRifx')

Monthly Downloads

22

Version

1.0.6

License

GPL (>= 2)

Maintainer

Ari Friedman

Last Published

May 29th, 2014

Functions in taRifx (1.0.6)

daysofweek

Return a vector of the days of the week, in order
hist_horiz

Kludgy horizontal histogram function (really should just fix the lattice equivalent)
fpart

Obtain the fractional part of a numeric
munch

Recursively delete entries containing `what` before entry pointed to by `which`
merge.list

Method to merge two lists Matches names of each list element and combines any sub-elements
evens

Shortcut functions to return the odd and even values from a vector
readdir

Loads all readable files in a directory into a list, with names according to the filenames
destring

Convert character vector to numeric, ignoring irrelevant characters.
write.sanitized.csv

Outputs a sanitized CSV file for fussy input systems e.g. ArcGIS and Mechanical Turk Performs three cleansing actions: converts text to latin1 encoding, eliminates funny characters in column names, and writes a CSV without the leading row.names column
homogenous

Returns whether a vector is homogenous or not
as.data.frame.by

Convert the results of by() to a data.frame.
panel.ecdf

Various panel functions
last

Convenience functions to return the last/first element of a vector
shift

Shifts a vector's elements left or right by N elements.
tab

Table function which lists NA entries by default This is a simple wrapper to change defaults from the base R table()
bytable

Produces a nice summary table by groupings
autoplot.microbenchmark

Autoplot method for microbenchmark objects: Prettier graphs for microbenchmark using ggplot2
rep_along

Repeat a vector until it matches the length of another vector
between

Classify values into groups based on which numbers they're between
sort.data.frame

Sort a data.frame
middle.group

Return a vector containing the locations of the middle of every group in a vector, either as a numerical index or as a TRUE/FALSE boolean.
expandDF

Functions to manipulate data frames
distinct

Returns number of distinct observations in each column of a data frame or in a vector
japply

japply: Judiciously sapply to only selected columns
title.page.new

Plot a title page containing the given text. Good for breaking up sections of plot PDFs.
sides

Figure out how many "sides" a formula has See also SimonO101's answer at http://stackoverflow.com/a/16376939/636656
latex.table.by

Exports a latex table with the first N columns being multirow grouping variables.
iapply

Iteratively (recursively) apply a function to its own output
as.matrix.by

Coerces a by object into a matrix (only tested on a 2d objects).
xtable.lme

Add in methods to handle LME objects in xtable
prettify

Function to prettify the output of another function using a `var.labels` attribute This is particularly useful in combination with read.dta et al.
searchPattern

Create a vector that starts with a given number and widens out
xtablelm

Produces the output of an lm object as it appears in the R console when you type summary(lmobject)
xtable.CrossTable

Add in methods to handle CrossTable objects in xtable
unfactor.data.frame

Convert all factors to character
categorize

Categorize a vector based on a data.frame with two columns, the low and high end points of each category.
remove.factors

Converts all factors in a data.frame to character.
splitc

Split data over columns
roundnear

Rounds a numeric vector to arbitrary values (not just decimal values as with round) or to a specified number of significant digits.
trues

Return vector of equal length containing all TRUEs
stack.list

Stack lists into data.frames
reshapeasy

reshapeasy: Easier reshaping from "wide" to "long" and back again
compareplot

Bar plot divided by three groupings