I am a new learner of R. I use Python, C and Fortran, so it is a little bit hard for me to understand what R does.
dim(data) returns the data's dim attribute. This is a function that returns a value. How can one assign a value to another value by something like dim(data) <- c(2, 2)?
And also, R passes everything by value, right? dim(data) does not return the address of dim attribute. This is making it more confusing, that we can use dim(data) <- c(2, 2) to assign a new dimension.
Thanks!