Re:R 4.0
by notafraudster on Friday April 24, 2020 @12:09PM
(#22969598)
You're correct provided the overwrite is occurring in the same namespace (e.g. the local environment). He is correct for the wrong reason if you try to alias something from another environment. For example, the following R code may initial seem weird:
my_vec <- c(1, 2, 3)
c <- 4
print(c)
my_vec2 <- c(5, 6, 7)
But as I describe in my top level comment, it has nothing to do with variables versus functions, just how namespaces work.
Either I'm greatly misunderstanding or this is just plain wrong - assigning something to the same name as an existing function will just overwrite the function.