"Feature" (bug?) in R 3.6.1

49 views Asked by At

Is this a bug or a feature..?

Reproducible example:

test <- data.frame(Time=1:10,Activity=runif(10))
head(test$Time)
names(test)[names(test)=="Time"]                      <- "Time_new"
head(test$Time)

Both calls produce the following output: [1] 1 2 3 4 5 6

test <- data.frame(Time=1:10,Activity=runif(10))
head(test$Time)
names(test)[names(test)=="Time"]                      <- "new_Time"
head(test$Time)

The first call produces [1] 1 2 3 4 5 6

.. only the second produced NULL

Weird! Running on Linux Mint 19.1

0

There are 0 answers