Skip to content

Excel Formulas and R Functions

Below is a short list of basic, commonly-used Excel formulas and their R counterparts. The R functions are part of Base R, in that they do no require third-party packages. This is not an exhaustive list by any stretch.

BAsic Arithmetic Functions
Excel formulaR function
SUMsum
AVERAGEmean
COUNTAlength
MAXmax (sometimes pmax)
MINmin (sometimes pmin)
STDEVsd
ABSabs
CEILING, ROUNDUPceiling
FLOOR, ROUNDDOWNfloor
ROUNDround
EXPexp
LOG, LNlog
SQRTsqrt
Basic Text Functions
Excel formulaR function
CONCATENATEpaste
LEFT, MID, RIGHTsubstr
LOWERtolower
UPPERtoupper
LENnchar
FINDgrepl, grep and others
REPLACEgsub and others

More Formulas

Excel formulaR function
ISNAis.na
MATCHwhich
REPTrep
RANKrank
VLOOKUPmerge (sort of)

Excel Features

Here are some Excel features and some of their close counterparts in R:

Excel FeatureR function(s)
Format Cellsas.Date, as.numeric, as.character (sort of)
Navigating / inspecting tablehead, tail, str, summary, dim, nrow
Text to Columnsstrsplit (sort of)

Leave a Reply

Your email address will not be published. Required fields are marked *