len | R Documentation |
Compute the length of the object
len(x, ...)
x |
Object. |
... |
Additional arguments needed for computing the length. |
An integer.
EMAIL <- new_class(class_name = "EMAIL")
email <- EMAIL$instantiate
register_method(EMAIL, ..init.. = function(address) self$address = address)
register_method(EMAIL, ..len.. = function() nchar(self$address))
patrick <- email('patrick@test.com')
len(patrick)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.