Skip to content
Prev 167897 / 398502 Next

how to get a primitive function object

Yi Zhang wrote:
i was sort-of joking, though it's a real option if you want it. 

but seriously, there's no reason for the &%#* lamenting:

x <- 1
'<-' = function(x,y) 0
x <- 2
# 0

.Primitive('<-')(x,2)
x
# 2

base::'<-'(x, 3)
x
# 3

base::'<-'('<-', base::'<-')
x <- 4
x
# 4

vQ