Man pages for basetable
Fast and Memory-Efficient Base R Table Manipulation

adddaysAdd days to a date
addedrowsRows present in 'new' but not in 'old'
addmonthsAdd months to a date
addweeksAdd weeks to a date
addyearsAdd years to a date
aggregateAggregate values by group
antimergeAnti-join two tables
applybyApply a function to each group
applycolsApply a function to selected columns
as_basetableCoerce an object to a basetable
assertcolsAssert that columns exist (alias)
assert_colsValidation and schema helpers
assertcompleteAssert that there are no missing values
assertkeyAssert that a key is unique (alias)
assertnamesAssert that required column names are present
assertrangeAssert that a column falls within a numeric range
assertrowsAssert that a row-wise condition holds for every row
asserttypeAssert that a column has an expected class
assertuniqueAssert that selected columns are unique
assertvaluesAssert that a column only contains allowed values
basetable-packageBase-Faithful Tabular Data Tools
betweendatesTest whether a date falls within a range
blanktonaRecode blank strings to 'NA'
btreadRead a delimited text file
btwriteWrite a data frame to a delimited text file
cardinalityDistinct-value count (or proportion) per column
casewhenMulti-branch selection by condition
ceilingdateRound a date up to a unit
centerCenter a vector at its mean
changedcolsCompare the columns of two tables
changedrowsRows whose key appears in both tables
classesColumn classes
cleannamesClean column names to a unique, syntactic form
collapselevelsCollapse factor levels into named groups
collapsetextCollapse a vector into a single string
collapsevaluesCollapse values into named groups
colnamesColumn names
commonnamesColumn names shared by two tables
compactDrop NULL elements from a list
compareCompare tables
compareschemaCompare the schemas of two tables
completegridComplete a table grid
constantsColumns with a single distinct non-missing value
containstextTest for a pattern match anywhere in the string
convertcolsConvert selected columns with a function
countCount rows by group
countmatchCount pattern matches per string
crossmergeCartesian join two tables
cumavgCumulative mean
cumcountCumulative row counter
cumedistCumulative empirical distribution
datediffDifference between two dates
dateseqSequence of dates
dayExtract the day of month
denserankDense rank of a vector
describeColumn descriptions
differenceLagged difference
diffrowsSet difference of rows
dimsTable dimensions
dropDrop columns
duplicatekeysDuplicated key combinations
duplicatenamesDuplicated column names
duplicaterowsRows involved in a duplicate
emptycolsColumns that are entirely blank or missing
emptyrowsRows that are entirely blank or missing
endswithTest whether strings end with a pattern
equaldataCompare two tables for equality
equalrowsCompare two tables' rows for equality
expandlevelsAdd levels to a factor
expandrowsRepeat rows in a table
extractExtract the first pattern match
extractallExtract all pattern matches
extractbetweenExtract text between two markers
extractintExtract an integer value from text
extractnumExtract a numeric value from text
fillbothFill missing values both forward and backward within groups
filldownFill missing values downward
fillupFill missing values upward
firstbyFirst row within each group
firstcolsMove columns to the front
firstrowsFirst 'n' rows
floordateRound a date down to a unit
foldrFold a vector or list from the right
freqFrequency table
headtailHead and tail rows
hourExtract the hour
intersectrowsSet intersection of rows
invalidrowsRows that fail a condition
invalidvaluesRows whose value is not in the allowed set
isalphaTest for alphabetic-only strings
isalphanumericTest for alphanumeric-only strings
is_basetableTest whether an object is a basetable
isblankTest for blank (missing or empty) values
isemailTest whether text looks like an email address
isintegertextTest whether text looks like an integer
isnumerictextTest whether text looks numeric
isurlTest whether text looks like a URL
joinrelationshipCardinality of a join key relationship
jointextConcatenate values element-wise
keepmissingKeep rows with missing values
lagvalueLag a vector
lastbyLast row within each group
lastcolsMove columns to the back
lastrowsLast 'n' rows
leadvalueLead a vector
leftFirst 'n' characters
locatePosition of the first pattern match
locateallPositions of all pattern matches
lowerConvert to lower case
lumpLump infrequent values into "Other"
mapMap over vectors and lists
matchedkeysRows of 'x' whose key is present in 'y'
matchestextTest for a full-string pattern match
mergeMerge two tables
middleSubstring between two positions
minuteExtract the minute
missingindicatorAdd missingness indicators
missingnessSummarize missing values by column or row
missingrowsReturn rows with missing values
monthExtract the month
moveMove columns before or after another column
naifRecode matching values to 'NA'
natoReplace 'NA' with a value
natoblankReplace 'NA' with an empty string
ncolsNumber of columns
nearestmergeNearest-key join
nearesttextNearest string match
nonequimergeMerge two tables using non-equi (inequality) conditions
normalizeencodingNormalize text encoding to UTF-8
normalizeunicodeNormalize Unicode text
nrowsNumber of rows
omitmissingDrop rows with missing values
orderrowsOrder rows by one or more columns
outofrangeRows whose value falls outside a range
overlapmergeMerge tables on overlapping intervals
padcenterPad text on both sides
padleftPad text on the left
padrightPad text on the right
parsecurrencyParse a currency string as a number
parsedateParse text as dates, trying multiple formats
parsedatetimeParse text as date-times, trying multiple formats
parsefailuresRows where parsing failed
parseintParse text as integers
parselogicalParse text as logicals
parsenumParse text as numbers
parsepercentParse a percentage string as a number
percentchangePeriod-over-period percent change
percentrankPercentile rank of a vector
pickSelect columns
previewCompact table preview
profileCompact variable profile
propcountGrouped counts with proportions
quantilegroupBin a vector into quantile groups
quarterExtract the calendar quarter
rangemergeMerge two tables by a range condition
rbindfillRow-bind tables, filling missing columns
recodeRecode values by lookup (alias)
removeaccentsStrip accents from text
removeallRemove text matching a pattern (alias)
removedrowsRows present in 'old' but not in 'new'
removeduplicatesRemove duplicate rows, optionally by key
removetextRemove text matching a pattern
renamecolsRename columns
renamewithRename columns with a function
reorderlevelsReorder factor levels
repairnamesRepair column names
replaceallRecode values by lookup (alias)
replacecolsReplace selected columns with new values
replacetextReplace a pattern with replacement text
replacevaluesRecode values by lookup
replacewhereReplace values in selected columns where a condition holds
rescaleRescale a vector to a new range
reverseReverse row order
rightLast 'n' characters
rollapplyRolling window apply
rollingmergeRolling join two tables
rollmaxRolling maximum
rollmeanRolling mean
rollmedianRolling median
rollminRolling minimum
rollprodRolling product
rollsdRolling standard deviation
rollsumRolling sum
rollvarRolling variance
rounddateRound a date to the nearest unit
rowallRow-wise 'all()' across columns
rowanyRow-wise 'any()' across columns
rowapplyApply a function row-wise
rowcountCount matches of a value across columns, per row
rowfirstFirst non-missing value across columns, per row
rowlastLast non-missing value across columns, per row
rowmaxRow-wise maximum across columns
rowminRow-wise minimum across columns
rownamesRow names
rownumberRow position
sameschemaTest whether two tables share the same column names
samplefracSample a fraction of rows without replacement
samplerowsSample 'n' rows without replacement
secondExtract the second
semimergeSemi-join two tables
sentencecaseConvert to sentence case
separateSplit one column into several
setthreadsSet basetable thread count for the session
similartextNearest string match (alias)
splitSplit a table by groups
splitfirstFirst piece after splitting on a separator
splitlastLast piece after splitting on a separator
splittextSplit text on a separator
squishTrim and collapse internal whitespace
stackStack columns
standardizeStandardize a vector to mean 0, SD 1
startswithTest whether strings start with a pattern
subsetCore data manipulation operations
summariesNamed grouped summaries
summarytabTable 1-style descriptive summary
textdistPairwise string distances
textlenCharacter length
titlecaseConvert to title case
tolongReshape columns into key/value rows
towideReshape rows into columns
transliterateTransliterate text to ASCII
transposeTranspose a table
traverseTraverse a list of arguments
trimTrim leading and trailing whitespace
truncateTruncate text with an ellipsis
typesColumn types
unionrowsSet union of rows
uniquerowsUnique rows, in memory or straight off a delimited file
uniquesCount of distinct values per column
uniteCombine several columns into one
unmatchedkeysDistinct keys of 'x' absent from 'y'
unstackUnstack a table
updatemergeUpdate rows from another table
upperConvert to upper case
weekExtract the week of year
weekdayExtract the weekday name
winsorizeWinsorize a vector at given quantiles
withinModify a table within an environment
yearExtract the year
yeardayExtract the day of year
basetable documentation built on Sept. 18, 2026, 9:13 a.m.