

Note that any data values that have been assigned to the symbols in the formula are not accessed when the formula itself is created. However, you'll often see that the variables that are included in formulas come from a data frame, just like in the following example: Sepal.Width ~ Petal.Width + log(Petal.Length) + Species Data structures are each designed to optimize some aspect of storage, access, or processing.Īs you saw in the examples above, the variables that are included in a formula can be vectors, for example. As the R Language Definition states, R does not provide direct access to the computer’s memory but rather provides a number of specialized data structures that you can refer to as "objects". A data structure is the interface to data organized in computer memory. Let's start at the beginning: in programming, you work with data structures store your data, and functions process it. Remember R is an object-oriented programming language: this language is organized around objects.


Since formulas are a special class in the R programming language, it's a good idea to briefly revise the data types and data structures that you have available in this programming language. Tip: are you interested in learning more about formulas in the context of statistical modeling? Take a look at DataCamp's Multiple and Logistic Regression course.
