I have a data frame in which some variable names include "." expansion. It seems that R will ignore this extension and give me a variable anyway if I try to access it without the full name of the variable. What causes it / why does it happen? Below is a mini example of my problem.
y <- rnorm(100)
x <- rlnorm(100)
data <- cbind.data.frame(y,x)
colnames(data) <- c("y.rnorm","x.rlnorm")
data$y
data$y.rnorm
source
share