I found a line the the genetics package that goes like this:
P <- D <- Dprime <- nobs <- chisq <- p.value <- corr <- R.2 <- P
note P
is both at the beginning and at the end. What does it mean?
This construct will assign the value of P
to variables with each of the other names given in the string of <-
s. That assignment will take place in the current environment.
Thus, if the variable named P
on the far right is not in the current environment, a new variable P
will be created in the current environment.
To see this in action, run the following from a fresh R session:
ls()
# character(0)
mean <- a <- b <- mean
ls()
# [1] "a" "b" "mean"
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