Learn R Programming

phylosim (version 3.0.5)

setWriteProtected.Alphabet: Set the write protection field for an object

Description

Set the write protection field for an object. Write protected objects cannot be modified through get/set methods and virtual fields.

Usage

# S3 method for Alphabet
setWriteProtected(this, value, ...)

Arguments

this

An object.

value

A logical vector of size one.

...

Not used.

Value

Invisible TRUE or FALSE.

See Also

For more information see Alphabet.

Examples

Run this code
# NOT RUN {
	# create an object
	o<-Alphabet()
	# toggle write protection
	setWriteProtected(o,TRUE)
	# check write protection
	o$writeProtected
	# set write protection via virtual field
	o$writeProtected<-FALSE
	o$writeProtected


 
# }

Run the code above in your browser using DataLab