Learn R Programming

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

base (version 3.6.0)

The R Base Package

Description

Base R functions.

Copy Link

Version

Version

3.6.0

License

Part of R 3.6.0

Last Published

December 12th, 2019

Functions in base (3.6.0)

Constants

Built-in Constants
Extremes

Maxima and Minima
Foreign-internal

Internal Versions of the Foreign Function Interface
log

Logarithms and Exponentials
Logic

Logical Operators
Random.user

User-supplied Random Number Generation
Random

Random Number Generation
Sys.localeconv

Find Details of the Numerical and Monetary Representations in the Current Locale
Sys.readlink

Read File Symbolic Links
R.Version

Version Information
abbreviate

Abbreviate Strings
all.equal

Test if Two Objects are (Nearly) Equal
all.names

Find All Names in an Expression
as.function

Convert Object to Function
asplit

Split Array/Matrix By Its Margins
Memory-limits

Memory Limits in R
Memory

Memory Available for Data Storage
base-package

The R Base Package
basename

Manipulate File Paths
browserText

Functions to Retrieve Values Supplied by Calls to the Browser
builtins

Returns the Names of All Built-in Objects
Primitive

Look Up a Primitive Function
Quotes

Quotes
character

Character Vectors
charmatch

Partial String Matching
Startup

Initialization at Start of an R Session
contributors

R Project Contributors
Arithmetic

Arithmetic Operators
copyright

Copyrights of Files Used to Build R
Syntax

Operator Syntax and Precedence
crossprod

Matrix Crossproduct
args

Argument List of a Function
AsIs

Inhibit Interpretation/Conversion of Objects
array

Multi-way Arrays
cumsum

Cumulative Sums, Products, and Extremes
diag

Matrix Diagonals
Extract.data.frame

Extract or Replace Parts of a Data Frame
Extract.factor

Extract or Replace Parts of a Factor
diff

Lagged Differences
drop

Drop Redundant Extent Information
attributes

Object Attribute Lists
droplevels

Drop Unused Levels from Factors
environment

Environment Access
eval

Evaluate an (Unevaluated) Expression
autoload

On-demand Loading of Packages
ISOdatetime

Date-time Conversion Functions from Numeric Representations
cbind

Combine R Objects by Rows or Columns
file.choose

Choose a File Interactively
char.expand

Expand a String with Respect to a Target Table
colSums

Form Row and Column Sums and Means
file.info

Extract File Information
Internal

Call an Internal Function
LongVectors

Long Vectors
agrep

Approximate String Matching (Fuzzy Matching)
MathFun

Miscellaneous Mathematical Functions
row+colnames

Row and Column Names
all

Are All Values True?
assign

Assign a Value to a Name
data.frame

Data Frames
data.matrix

Convert a Data Frame to a Numeric Matrix
force

Force Evaluation of an Argument
deparseOpts

Options for Expression Deparsing
forceAndCall

Call a function with Some Arguments Forced
assignOps

Assignment Operators
gctorture

Torture Garbage Collector
get

Return the Value of a Named Object
is.finite

Finite, Infinite and NaN Numbers
det

Calculate the Determinant of a Matrix
Cstack_info

Report Information on C Stack Size and Usage
base-deprecated

Deprecated Functions in Package base
is.function

Is an Object of Type (Primitive) Function?
dontCheck

Identity Function to Suppress Checking
DateTimeClasses

Date-Time Classes
Deprecated

Marking Objects as Deprecated
dots

…, ..1, etc used in Functions
Encoding

Read or Set the Declared Encodings for a Character Vector
base-internal

Internal Objects in Package base
dump

Text Representations of R Objects
by

Apply a Function to a Data Frame Split by Factors
duplicated

Determine Duplicate Elements
c

Combine Values into a Vector or List
InternalMethods

Internal Generic Functions
class

Object Classes
expression

Unevaluated Expressions
extSoftVersion

Report Versions of Third-Party Software
col

Column Indexes
complex

Complex Numbers and Basic Functionality
La_library

LAPACK Library
is.unsorted

Test if an Object is Not Sorted
is.R

Are we using R, rather than S?
Paren

Parentheses and Braces
conditions

Condition Handling and Recovery
kronecker

Kronecker Products on Arrays
Colon

Colon Operator
.Platform

Platform Specific Variables
Reserved

Reserved Words in R
Rhome

Return the R Home Directory
Sys.setFileTime

Set File Time
detach

Detach Objects from the Search Path
formatDL

Format Description Lists
formatC

Formatting Using C-style Formats
Sys.setenv

Set or Unset Environment Variables
Sys.which

Find Full Paths to Executables
Trig

Trigonometric Functions
getLoadedDLLs

Get DLLs Loaded in Current Session
.Device

Lists of Open/Active Graphics Devices
getNativeSymbolInfo

Obtain a Description of one or more Native (C/Fortran) Symbols
dimnames

Dimnames of an Object
Comparison

Relational Operators
l10n_info

Localization Information
Bessel

Bessel Functions
load

Reload Saved Datasets
do.call

Execute a Function Call
gettext

Translate Text Messages
locales

Query or Set Aspects of the Locale
as.Date

Date Conversion Functions to and from Character
getwd

Get or Set Working Directory
integer

Integer Vectors
Dates

Date Class
dyn.load

Foreign Function Interface
Defunct

Marking Objects as Defunct
eapply

Apply a Function Over Values in an Environment
format.info

format(.) Information
as.POSIX*

Date-time Conversion Functions
Foreign

Foreign Function Interface
margin.table

Compute table margin
CallExternal

Modern Interfaces to C/C++ code
interaction

Compute Factor Interactions
lengths

Lengths of List or Vector Elements
mat.or.vec

Create a Matrix or a Vector
message

Diagnostic Messages
levels

Levels Attributes
backsolve

Solve an Upper or Lower Triangular System
base-defunct

Defunct Functions in Package base
library

Loading/Attaching and Listing of Packages
Hyperbolic

Hyperbolic Functions
EnvVar

Environment Variables
library.dynam

Loading DLLs from Packages
missing

Does a Formal Argument have a Value?
NumericConstants

Numeric Constants
Ops.Date

Operators on the Date Class
capabilities

Report Capabilities of this Build of R
mode

The (Storage) Mode of an Object
format.pval

Format P Values
RdUtils

Utilities for Processing Rd Files
name

Names and Symbols
function

Function Definition
Recall

Recursive Calling
cat

Concatenate and Print
funprog

Common Higher-Order Functions in Functional Programming Languages
numeric_version

Numeric Versions
gl

Generate Factor Levels
Sys.getenv

Get Environment Variables
match

Value Matching
Sys.getpid

Get the Process ID of the R Session
grep

Pattern Matching and Replacement
Sys.sleep

Suspend Execution for a Time Interval
match.arg

Argument Verification Using Partial Matching
Sys.time

Get Current Date and Time
maxCol

Find Maximum Position in Matrix
chartr

Character Translation and Casefolding
interactive

Is R Running Interactively?
chkDots

Warn About Extraneous Arguments in the "..." of Its Caller
any

Are Some Values True?
aperm

Array Transposition
curlGetHeaders

Retrieve Headers from URLs
cut.POSIXt

Convert a Date or Date-Time Object to a Factor
mean

Arithmetic Mean
invisible

Change the Print Mode to Invisible
nrow

The Number of Rows/Columns of an Array
Extract

Extract or Replace Parts of an Object
is.recursive

Is an Object Atomic or Recursive?
is.single

Is an Object of Single Precision Type?
octmode

Display Numbers in Octal
La_version

LAPACK Version
attach

Attach Set of R Objects to Search Path
ns-dblcolon

Double Colon and Triple Colon Operators
attr

Object Attributes
.bincode

Bin a Numeric Vector
pmatch

Partial String Matching
labels

Find Labels from Object
bindenv

Binding and Environment Locking, Active Bindings
polyroot

Find Zeros of a Real or Complex Polynomial
path.expand

Expand File Paths
call

Function Calls
pcre_config

Report Configuration Options for PCRE
callCC

Call With Current Continuation
chol

The Choleski Decomposition
proc.time

Running Time of R
print.default

Default Printing
prod

Product of Vector Elements
readRDS

Serialization Interface for Single Objects
readRenviron

Set Environment Variables from a File
Last.value

Value of Last Evaluated Expression
lapply

Apply a Function over a List or Vector
chol2inv

Inverse from Choleski (or QR) Decomposition
prmatrix

Print Matrices, Old-style
ls

List Objects
conflicts

Search for Masked Objects on the Search Path
NA

‘Not Available’ / Missing Values
remove

Remove Objects from a Specified Environment
NULL

The Null Object
dcf

Read and Write Data in DCF Format
quit

Terminate an R Session
debug

Debug a Function
dataframeHelpers

Data Frame Auxiliary Functions
connections

Functions to Manipulate Connections (Files, URLs, ...)
make.names

Make Syntactically Valid Names
date

System Date and Time
difftime

Time Intervals / Differences
round.POSIXt

Round / Truncate Data-Time Objects
dim

Dimensions of an Object
memCompress

In-memory Compression and Decompression
double

Double-Precision Vectors
exists

Is an Object Defined?
expand.grid

Create a Data Frame from All Combinations of Factor Variables
memlimits

Query and Set Heap Size Limits
seq.Date

Generate Regular Sequences of Dates
names

The Names of an Object
nargs

The Number of Arguments to a Function
Round

Rounding of Numbers
range

Range of Values
dput

Write an Object to a File or Recreate it
readChar

Transfer Character Strings To and From Connections
factor

Factors
formals

Access to and Manipulation of the Formal Arguments
file.access

Ascertain File Accessibility
ns-topenv

Top Level Environment
seq.POSIXt

Generate Regular Sequences of Times
Special

Special Functions of Mathematics
numeric

Numeric Vectors
parse

Parse R Expressions
readLines

Read Text Lines from a Connection
Sys.glob

Wildcard Expansion on File Paths
paste

Concatenate Strings
slotOp

Extract or Replace A Slot
pos.to.env

Convert Positions in the Search Path to Environments
structure

Attribute Specification
strtrim

Trim Character Strings to Specified Display Widths
socketSelect

Wait on Socket Connections
taskCallbackManager

Create an R-level Task Callback Manager
pretty

Pretty Breakpoints
Sys.info

Extract System and User Information
qr

The QR Decomposition of a Matrix
taskCallbackNames

Query the Names of the Current Internal Top-Level Task Callbacks
format

Encode in a Common Format
showConnections

Display Connections
file.path

Construct Path to File
traceback

Get and Print Call Stacks
tracemem

Trace Copying of Objects
UseMethod

Class Methods
Vectorize

Vectorize a Scalar Function
validUTF8

Check if a Character Vector is Validly Encoded
grouping

Grouping Permutation
append

Vector Merging
vector

Vectors
apply

Apply Functions Over Array Margins
gzcon

(De)compress I/O Through Connections
icuSetCollate

Setup Collation by ICU
sign

Sign Function
QR.Auxiliaries

Reconstruct the Q, R, or X Matrices from a QR Object
file.show

Display One or More Text Files
identical

Test Objects for Exact Equality
find.package

Find Packages
regex

Regular Expressions as used in R
regmatches

Extract or Replace Matched Substrings
strptime

Date-time Conversion Functions to and from Character
findInterval

Find Interval Numbers or Indices
strrep

Repeat the Elements of a Character Vector
getCallingDLL

Compute DLL for Native Interface Call
row

Row Indexes
getDLLRegisteredRoutines

Reflectance Information for C/Fortran routines in a DLL
switch

Select One of a List of Alternatives
hexmode

Display Numbers in Hexadecimal
sys.parent

Functions to Access the Function Call Stack
as.data.frame

Coerce to a Data Frame
jitter

‘Jitter’ (Add Noise) to Numbers
row.names

Get and Set Row Names for Data Frames
lazyLoad

Lazy Load a Database of R Objects
kappa

Compute or Estimate the Condition Number of a Matrix
as.environment

Coerce to an Environment Object
bitwise

Bitwise Logical Operations
unique

Extract Unique Elements
seq

Sequence Generation
sequence

Create A Vector of Sequences
unlink

Delete Files and Directories
warning

Warning Messages
iconv

Convert Character Vector between Encodings
warnings

Print Warning Messages
length

Length of an Object
writeLines

Write Lines to a Connection
body

Access to and Manipulation of the Body of a Function
xtfrm

Auxiliary Function for Sorting and Ranking
sink

Send R Output to a File
slice.index

Slice Indexes in an Array
is.language

Is an Object a Language Object?
is.object

Is an Object ‘internally classed’?
license

The R License Terms
strsplit

Split the Elements of a Character Vector
srcfile

References to Source Files and Code
sprintf

Use C-style String Formatting Commands
list

Lists -- Generic and Dotted Pairs
list.files

List the Files in a Directory/Folder
list2env

From A List, Build or Add To an Environment
bquote

Partial substitution in expressions
make.unique

Make Character Strings Unique
strtoi

Convert Strings to Integers
mapply

Apply a Function to Multiple List or Vector Arguments
matmult

Matrix Multiplication
svd

Singular Value Decomposition of a Matrix
match.call

Argument Matching
match.fun

Extract a Function Specified by Name
browser

Environment Browser
commandArgs

Extract Command Line Arguments
comment

Query or Set a "comment" Attribute
matrix

Matrices
normalizePath

Express File Paths in Canonical Form
NotYet

Not Yet Implemented Functions and Unused Arguments
nchar

Count the Number of Characters (or Bytes or Width)
nlevels

The Number of Levels of a Factor
sweep

Sweep out Array Summaries
cut

Convert Numeric to Factor
data.class

Object Classes
delayedAssign

Delay Evaluation
table

Cross Tabulation and Table Creation
tabulate

Tabulation for Vectors
ns-hooks

Hooks for Namespace Events
on.exit

Function Exit Code
deparse

Expression Deparsing
options

Options Settings
eigen

Spectral Decomposition of a Matrix
transform

Transform an Object, for Example a Data Frame
encodeString

Encode Character Vector as for Printing
files

File Manipulation
ns-internals

Namespace Internals
rawConversion

Convert to or from Raw Vectors
print

Print Values
files2

Manipulation of Directories and File Permissions
readBin

Transfer Binary Data To and From Connections
rep

Replicate Elements of Vectors and Lists
replace

Replace Values in a Vector
trimws

Remove Leading/Trailing Whitespace
sample

Random Samples and Permutations
save

Save R Objects
gc

Garbage Collection
search

Give Search Path for R Objects
gc.time

Report Time Spent in Garbage Collection
grepRaw

Pattern Matching for Raw Vectors
seek

Functions to Reposition Connections
print.data.frame

Printing Data Frames
userhooks

Functions to Get and Set Hooks for Load, Attach, Detach and Unload
groupGeneric

S3 Group Generic Functions
source

Read R Code from a File, a Connection or Expressions
rank

Sample Ranks
utf8Conversion

Convert Integer Vectors to or from UTF-8-encoded Character Vectors
withVisible

Return both a Value and its Visibility
rapply

Recursively Apply a Function to a List
identity

Identity Function
ifelse

Conditional Element Selection
write

Write Data to a File
readline

Read a Line from the Terminal
reg.finalizer

Finalization of Objects
zutils

Miscellaneous Internal/Programming Utilities
split

Divide into Groups and Reassemble
isS4

Test for an S4 object
sum

Sum of Vector Elements
rowsum

Give Column Sums of a Matrix or Data Frame, Based on a Grouping Variable
isSymmetric

Test if a Matrix or other Object is Symmetric (Hermitian)
summary

Object Summaries
sQuote

Quote Text
serialize

Simple Serialization Interface
t

Matrix Transpose
system2

Invoke a System Command
libPaths

Search Paths for Packages
libcurlVersion

Report Version of libcurl
setTimeLimit

Set CPU and/or Elapsed Time Limits
tapply

Apply a Function Over a Ragged Array
logical

Logical Vectors
taskCallback

Add or Remove a Top-Level Task Callback
lower.tri

Lower and Upper Triangular Part of a Matrix
memory.profile

Profile the Usage of Cons Cells
merge

Merge Two Data Frames
solve

Solve a System of Equations
noquote

Class for ‘no quote’ Printing of Character Strings
norm

Compute the Norm of a Matrix
weekdays

Extract Parts of a POSIXt or Date Object
sort

Sorting or Ordering Vectors
ns-load

Loading and Unloading Name Spaces
stop

Stop Function Execution
stopifnot

Ensure the Truth of R Expressions
ns-reflect.Rd

Namespace Reflection Support
which

Which indices are TRUE?
strwrap

Wrap Character Strings to Format Paragraphs
which.min

Where is the Min() or Max() or first TRUE or FALSE ?
subset

Subsetting Vectors, Matrices and Data Frames
with

Evaluate an Expression in a Data Environment
sys.source

Parse and Evaluate Expressions from a File
order

Ordering Permutation
system

Invoke a System Command
outer

Outer Product of Arrays
prop.table

Express Table Entries as Fraction of Marginal Table
pushBack

Push Text Back on to a Connection
raw

Raw Vectors
tilde

Tilde Operator
rawConnection

Raw Connections
timezones

Time Zones
toString

Convert an R Object to a Character String
rev

Reverse Elements
zapsmall

Rounding of Numbers: Zapping Small Ones to Zero
trace

Interactive Tracing and Debugging of Calls to a Function or Method
zpackages

Listing of Packages
rle

Run Length Encoding
scale

Scaling and Centering of Matrix-like Objects
scan

Read Data Values
sets

Set Operations
shQuote

Quote Strings for Use in OS Shells
standardGeneric

Formal Method System -- Dispatching S4 Methods
startsWith

Does String Start or End With Another String?
substitute

Substituting and Quoting Expressions
substr

Substrings of a Character Vector
system.file

Find Names of R System Files
system.time

CPU Time Used
tempfile

Create Names for Temporary Files
textConnection

Text Connections
try

Try an Expression Allowing Error Recovery
typeof

The Type of an Object
unlist

Flatten Lists
unname

Remove names or dimnames
.Machine

Numerical Characteristics of the Machine
.Script

Scripting Language Interface
Control

Control Flow