Naturally, I had little success searching Google for "R I", "I in R", and "R language I".
Can someone explain the "interaction" comment? Can someone explain why "logdist^2" wouldn't be interpreted in the traditional way?
I isolates or insulates the contents of I( ... ) from the gaze of R's formula parsing code. It allows the standard R operators to work as they would if you used them outside of a formula, rather than being treated as special formula operators.
The pipe operator, written as %>% , has been a longstanding feature of the magrittr package for R. It takes the output of one function and passes it into another function as an argument. This allows us to link a sequence of analysis steps.
== A boolean (meaning there are two possible values, true or false) operator which ensures that the values on the left side are the exact same as the values on the right, i.e., 5==5 would be true and 5==9 would be false.
It is just a variable name. R variables names can consist of alphanumerics and dot (.)
From p89 of R in a Nutshell
Caret(^
) [is] Used to indicate crossing to a specific degree. For example:
y~(u+w)^2
is equivalent to
y~(u+w)*(u+w)
Identity function (I()
) Used to indicate that the enclosed expression should be interpreted by it's arithmetic meaning. For example
a+b
means that both a and b should be included in the formula. The formula:
I(a+b)
means that "a plus b" should be included in the formula. See also ?AsIs()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With