powered by
With unclass<- you can circumvent class dispatch on the assignment operator
unclass<-
unclass(x) <- value
some object
the value to be assigned
the modified object
unclass, undim
unclass
undim
# NOT RUN { x <- factor(letters) unclass(x)[1:3] <- 1L x # }
Run the code above in your browser using DataLab