Learn R Programming

eatTools

eatTools contains various functions required for R packages eatModel, eatRep, eatPrep and eatGADS. Most functions are related to data preparation, cleaning, descriptive analyses and weighted statistics.

Installation

# Install stable version from CRAN via
install.packages("eatTools")

# Install development version from GitHub via
devtools::install_github("weirichs/eatTools")

Copy Link

Version

Install

install.packages('eatTools')

Monthly Downloads

697

Version

0.7.10

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Sebastian Weirich

Last Published

September 25th, 2026

Functions in eatTools (0.7.10)

multiseq

multiple sequences
halveString

Split string exactly in two parts
removeNonNumeric

Removes all non-numeric characters from a string.
seq2

Sequence generation
recodeLookup

Recode a variable according to a lookup table
roundDF

Round a data.frame.
na_omit_selection

Drop rows containing missing values
tableUnlist

Frequency table for data frames, e.g. across multiple columns
whereAre

Matches a scalar with elements of a vector.
insert.col

Insert Columns into a data.frame at a Specific Position
wtdVar

Computed weighted variance
num.to.cat

Transform continuous variables into ordered factors
set.col.type

Set the Class of Columns in a Data Frame
tablePattern

Creates skeleton for frequency tables with desired values
rbind_fill_vector

Combine vectors of unequal length by row, filling missing columns with NA.
wideToLong

Transform wide format data sets into the long format necessary for eatRep analyses
readMultisep

Read in data.frames with separator characters >=1Byte
%$$%

Extract Parts of an Object (list)
print_and_capture

Easy integration of (small) tables into (error) messages
wtdTable

Computed weighted frequency tables
removeNumeric

Removes alphanumeric characters from a string.
removePattern

Removes a specified pattern from a string.
do_call_rbind_withName

Row bind a list while assigning names to rows
catch_asNumericIfPossible

Use asNumericIfPossible with modified warning.
checkBackgroundVariables

Internally needed function for consistency checks and data preparation.
crop

Remove Trailing and Leading Characters From Character Strings
cleanifyString

Removes special characters
asNumericIfPossible

Convert a Vector, Matrix or Data Frame Into Numeric Values If Possible
data.timss1

Example dataset TIMSS 2011
addLeadingZerosToCharInt

Add leading zeros to all columns that can be identified as integers in a character data.frame
contr.wec.weighted

Calculates contrasts for a weighted factor variable based on weighted effect coding
descr

Descriptive statistics for one or several variables
facToChar

Transform columns in a data frame
mergeAttr

Merge Two Data Frames with additional messages and maintain variable attributes
makeDataFrame

Converts tbl or data.table objects to plain data.frames for internal processing
gsubAll

Pattern matching and replacement
makeTria

Reshapes an unordered covariance/correlation matrix into triangular shape
eatTools-package

eatTools: Miscellaneous Functions for the Analysis of Educational Assessments
existsBackgroundVariables

Internally needed function for consistency checks and data preparation.
rbind_common

Combine data.frames by row, using only common columns.
pwc

Part-whole correlation for numeric data frames