Skip to content

Write protecting objects

2 messages · Adaikalavan Ramasamy, Thomas Lumley

#
Is there a function to write protect a matrix  or list ?

I have considered making a duplicate copy. But I am wondering if
alternatives exist. Thanks.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 12 Jul 2002, Adaikalavan Ramasamy wrote:

            
You could do this up to a point by defining a class with nonfunctional
subscripting methods
Error in "[<-.nowrite"(*tmp*, 3, 4, value = 4) :
        Write protected
Error in "[<-.nowrite"(*tmp*, 3, , value = trees[2, ]) :
        Write protected

but this can't protect you against
and it doesn't even seem to work on $
You probably want a duplicate copy.

	-thomas



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._