Learn R Programming

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

DataCombine (version 0.2.2)

R tools for making it easier to combine and clean data sets.

Description

R tools for combining and cleaning data sets, including filling in missing observations with data from another data frame and creating lag/lead variables.

Copy Link

Version

Install

install.packages('DataCombine')

Monthly Downloads

90

Version

0.2.2

License

GPL (>= 3)

Maintainer

Christopher Gandrud

Last Published

August 13th, 2014

Functions in DataCombine (0.2.2)

FindReplace

Replace multiple patterns found in a character string column of a data frame
InsertRow

Inserts a new row into a data frame
FillDown

Fills in missing (NA) values with the previous non-missing value
CountSpell

Count spells, including for grouped data
dMerge

Merges 2 data frames and report/drop/keeps only duplicates.
slideMA

Create a moving average for a period before or after each time point for a given variable
NaVar

Create new variable(s) indicating if there are missing values in other variable(s)
FillIn

A function for filling in missing values of a variable from one data frame with the values from another variable.
StartEnd

Find the starting and ending time points of a spell
MoveFront

Move variables to the front of a data frame.
SpreadDummy

Spread a dummy variable (1's and 0') over a specified time period and for specified groups
shift

A function for creating lag and lead variables.
TimeExpand

Expands a data set so that it includes an observation for each time point in a sequence. Works with grouped data.
FindDups

Find duplicated values in a data frame and subset it to either include or not include them.
change

Calculate the changes (absolute, percent, and proportion) changes from a specified lag, including within groups
grepl.sub

Subset a data frame if a specified pattern is found in a character string
slide

A function for creating lag and lead variables, including for time-series cross-sectional data.
VarDrop

Drop one or more variables from a data frame.
PercChange

Calculate the percentage change from a specified lag, including within groups
DropNA

Drop rows from a data frame with missing values on a given variable(s).
rmExcept

Remove all objects from a workspace except those specified by the user.
TimeFill

Creates a continuous Unit-Time-Dummy data frame from a data frame with Unit-Start-End times
shiftMA

Internal function for slideMA
CasesTable

Create reports cases after listwise deletion of missing values for time-series cross-sectional data.