elco-extract | R Documentation |
elco
objectExtract or replace parts of an elco
object
## S3 method for class 'elco' x[i] ## S3 method for class 'elco' x[[i]] ## S3 replacement method for class 'elco' x[i, j, ...] <- value ## S3 replacement method for class 'elco' x[[i, j, ...]] <- value
x |
An |
i, j, ... |
indices specifying elements to extract or replace. See
|
value |
An object of class |
An object of class elco
with subsetted or replaced values.
elco::chno$C[1] elco::chno$C[[1]] x <- elco::chno$C y <- elco::chno$N z <- NA_real_ # returns `elco` object because both have the same el_symbol attribute x[1] <- x[2] class(x) # strips off the elco class because the el_symbol attribute differs y[1] <- x[2] class(y) # strips off the elco class because z is no elco object x[1] <- z class(x) x <- elco::chno$C y <- elco::chno$N # returns `elco` object because both have the same el_symbol attribute x[[1]] <- x[2] class(x) # strips off the elco class because the el_symbol attribute differs y[[1]] <- x[2] class(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.