#problematic code
x=gseq(1,10)
y=x
x[1]=1000
show(y)#changes to x also change y
#correct
x=gseq(1,10)
y=gdup(x)
x[1]=1000
show(y) #changes to x do not change y
#copy to a different device
#y=gdup(x, dev=2L)
Run the code above in your browser using DataLab