Common Uncommon Notations that Confuse New R Coders

Here are a few of the more commonly used notations found in R code and documentation that confuse coders of any skill level who are new to R.

Be aware that any variable name that begins with a period character (.) is usually hidden from view, so won’t be seen in the Environment pane in RStudio or listed when you invoke


unless you specify

  ls(all.names = TRUE)

Notation Meaning
. The period can be used as a character in any variable name. Unlike in Java and other languages, it does not indicate object hierarchy. is just that: a variable name. There is no object called a with a property called variable with a property called name. There is just a single name,, that you may have associated with an object. You’ll sometimes see model.1 and model.2 style naming used. Again, there is no model object in such cases.
. The single period can be the entire name of a variable. It’s often found in association with the magrittr pipe operator %>% and is the name used to denote “the otherwise anonymous object being passed in from the left-hand side (LHS)”. You typically see it used when you need to pass the piped object into base-R or other non-tidyverse functions. Normally, tidyverse functions are written to accept a data object as their first parameter and the pipe operator passes the result of the LHS implicitly as the first argument, but base-R functions might expect the data object in any parameter position.

Known as “dot-dot-dot”, “ellipses”, or “three dots”—difficult to search for, unless you know those names for it. This is another variable name. It can only be used as a formal parameter to a function and is often simply passed along to other functions called from within that function. It’s a way of coding the intention that “at coding time, we don’t know what additional arguments or how many may be passed in, so we’re just going to accept any number of additional arguments.” You can choose to parse them yourself and make use of them or simply pass them on to other functions you invoke within your function.

.x and .y Often used as a generic variable name for any type of object: see purrr::map and purrr::map2.
.f Often used as a generic variable name for a function object: see purrr::map.
.data Often used as a generic variable name for a data.frame object, especially when being used as the first parameter to a function written to play nicely in the tidyverse: see dplyr::select.
df This could mean “degrees of freedom”, but it’s also often used as a mnemonic generic variable name for a data.frame object, when you don’t yet know a better, more descriptive name to use. Consider it the “this could be any data.frame” name for a data.frame. It’s often found in early iterations of exploratory code and in example code. You should use more intention revealing variable names, when you can.
.Last.value This is the variable name R automatically associates with the most recently evaluated object. Usually hidden, RStudio has an option to make it visible in your Environment pane: Tools > Global options… > General > Advanced > Show .Last.value in environment listing
`` The backtick character is found to the left of the 1 key on U.S. English keyboards and is used to delimit names of objects that would otherwise not be allowed:



Examples (contrived and otherwise)


letters %>% grepl("[aeiou]", .)

mtcars %>% mutate(design = paste(.$cyl, .$carb, .$am, sep = "x"))

example <- function(a, b, ...) {
  sum(a, b, ...)

example(40, 2)  # 42
example(40, NA) # NA
example(40, NA, na.rm = TRUE) # 40

.x and .y

example <- function(.x, .y) {
  sum(.x, .y)


example <- function(.x, .y, .f) {
  .f(.x, .y)

example(40, 2, sum)
example(40, 2, `*`)



example <- function(.data) {
  .data %>%
    slice(1:3) %>%
    select(2, 4, 6)



df <- mtcars


You can think of the df example as saying, "however you get your data–whether from a CSV file, from the web, or by hand creating it–you generate a data.frame. Now, here's what you can do with that data.frame."



x <- .Last.value

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.