Absolute row number : The sequential index of a row in a table, regardless of what sections of the table is being displayed.
Aggregation : To combine many values into one, e.g., by summing a set of numbers or concatenating a set of strings.
Alias : To have two (or more) references to the same physical data.
Anonymous function : A function that has not been assigned a name. Anonymous functions are usually quite short, and are usually defined where they are used, e.g., as callbacks.
Attribute : A name-value pair associated with an object, used to store metadata about the object such as an array's dimensions.
Catch (exception) : To accept responsibility for handling an error or other unexpected event. R prefers "handling a condition" to "catching an exception".
Condition : An error or other unexpected event that disrupts the normal flow of control. See also handle.
Constructor (class) : A function that creates an object of a particular class. In the S3 object system, constructors are a convention rather than a requirement.
Copy-on-modify : The practice of creating a new copy of aliased data whenever there is an attempt to modify it so that each reference will believe theirs is the only one.
Double square brackets
: An index enclosed in [[...]]
,
used to return a single value of the underlying type.
See also single square brackets.
Eager evaluation : Evaluating an expression as soon as it is formed.
Empty vector : A vector that contains no elements. Empty vectors have a type such as logical or character, and are not the same as null.
Environment : A structure that stores a set of variable names and the values they refer to.
Error : The most severe type of built-in condition in R.
Evaluating function : A function that takes arguments as values. Most functions are evaluating functions.
Evaluation
: The process of taking a complex expression such as 1+2*3/4
and turning it into a single irreducible value.
Exception : An object containing information about an error, or the condition that led to the error. R prefers "handling a condition" to "catching an exception".
Filter : To choose a set of records according to the values they contain.
Fully qualified name
: An unambiguous name of the form package::thing
.
Functional programming : A style of programming in which functions transform data rather than modifying it. Functional programming relies heavily on higher-order functions.
Generic function : A collection of functions with similar purpose, each operating on a different class of data.
Global environment : The environment that holds top-level definitions in R, e.g., those written directly in the interpreter.
Group : To divide data into subsets according to some criteria while leaving records in a single structure.
Handle (a condition) : To accept responsibility for handling an error or other unexpected event. R prefers "handling a condition" to "catching an exception".
Helper (class) : In S3, a function that constructs and validates an instance of a class.
Heterogeneous : Potentially containing data of different types. Most vectors in R are homogeneous, but lists can be heterogeneous.
Higher-order function
: A function that takes one or more other functions as parameters.
Higher-order functions such as map
are commonly used in functional programming.
Homogeneous : Containing data of only a single type. Most vectors in R are homogeneous.
Hubris : Excessive pride or self-confidence. See also unit test (lack of).
ISO3 country code : A three-letter code defined by ISO 3166-1 that identifies a specific country, dependent territory, or other geopolitical entity.
Lazy evaluation : Delaying evaluation of an expression until the value is actually needed (or at least until after the point where it is first encountered).
List : A vector that can contain values of many different types.
List comprehension : An expression that generates a new list from an existing one via an implicit loop.
Logical indexing : To index a vector or other structure with a vector of Booleans, keeping only the values that correspond to true values.
Message : The least severe type of built-in condition in R.
Method : An implementation of a generic function that handles objects of a specific class.
NA : A special value used to represent data that is Not Available.
Name collision : A situation in which the same name has been used in two different packages which are then used together, leading to ambiguity.
Negative selection : To specify the elements of a vector or other data structure that aren't desired by negating their indices.
Null
: A special value used to represent a missing object.
NULL
is not the same as NA
,
and neither is the same as an empty vector.
Package : A collection of code, data, and documentation that can be distributed and re-used.
Pipe operator
: The %>%
used to make the output of one function the input of the next.
Prefix operator
: An operator that comes before the single value it operates on,
such as the -
in -(a*b)
.
Promise : A data structure used to record an unevaluated expression for lazy evaluation.
Pull indexing
: Vectorized indexing in which the value at location i in the index vector
specifies which element of the source vector
is being pulled into that location in the result vector,
i.e., result[i] = source[index[i]]
.
See also push indexing.
Push indexing
: Vectorized indexing in which the value at location i in the index vector
specifies an element of the result vector that gets the corresponding element of the source vector,
i.e., result[index[i]] = source[i]
.
Push indexing can easily produce gaps and collisions.
See also pull indexing.
Quosure : A data structure containing an unevaluated expression and its environment.
Quoting function : A function that is passed expressions rather than the values of those expressions.
Raise (exception) : A way of indicating that something has gone wrong in a program, or that some other unexpected event has occurred. R prefers "signalling a condition" to "raising an exception".
Range expression
: An expression of the form low:high
that is transformed a sequence of consecutive integers.
Reactive programming : A style of programming in which actions are triggered by external events.
Reactive variable : A variable whose value is automatically updated when some other value or values change.
Recycle : To re-use values from a shorter vector in order to generate a sequence of the same length as a longer one.
Regular expression : A pattern for matching text. Regular expressions are themselves written as text, which makes them as cryptic as they are powerful.
Relative row number : The index of a row in a displayed portion of a table, which may or may not be the same as the absolut row number within the table.
Repository : The place where a version control system stores a project's files and the metadata used to record their history.
S3 : A framework for object-oriented programming in R.
Scalar : A single value of a particular type, such as 1 or "a". Scalars don't really exist in R; values that appear to be scalars are actually vectors of unit length.
Select : To choose entire columns from a table by name or location.
Setup (testing) : Code that is automatically run once before each unit test.
Signal (a condition) : A way of indicating that something has gone wrong in a program, or that some other unexpected event has occurred. R prefers "signalling a condition" to "raising an exception".
Single square brackets
: An index enclosed in [...]
,
used to select a structure from another structure.
See also double square brackets.
Storage allocation : Setting aside a block of memory for future use.
Teardown (testing) : Code that is automatically run once after each unit test.
Test fixture : The data structures, files, or other artefacts on which a unit test operates.
Test runner : A software tool that finds and runs unit tests.
Tibble : A modern replacement for R's data frame, which stores tabular data in columns and rows, defined and used in the tidyverse.
Tidyverse : A collection of R packages for operating on tabular data in consistent ways.
Unit test : A function that tests one aspect or property of a piece of software.
Validator (class) : A function that checks the consistency of an S3 object.
Variable arguments
: In a function,
the ability to take any number of arguments.
R uses ...
to capture the "extra" arguments.
Vector : A sequence of values, usually of homogeneous type. Vectors are the fundamental data structure in R; scalars are actually vectors of unit length.
Vectorize : To write code so that operations are performed on entire vectors, rather than element-by-element within loops.
Warning : A built-in condition in R of middling severity.
Widget : An interactive control element in an user interface.