Use this to create a clarion object. This object is used by all top-level wilson modules.
Clarion$new(header = NULL, metadata, data, validate = TRUE)
| Variable | Return |
header |
| A named list. Defaults to NULL. |
metadata |
Clarion metadata in form of a data.table. |
data |
Data.table according to metadata. |
validate |
| Logical value to validate on initialization. Defaults to TRUE. | Variable | Return |
headerList of global information regarding the whole experiment.
metadataData.table with additional information for each column.
dataData.table containing experiment result data.
get_id()Returns name of unique identifier column. Assumes first feature to be unique if not specified.
Clarion$get_id()
Name of the id column.
get_name()Returns name of name column. If not specified return unique Id.
Clarion$get_name()
Name of the name column.
get_delimiter()Return delimiter used within multi-value fields (no delimiter = NULL).
Clarion$get_delimiter()
is_delimited()Logical whether the given column name is delimited.
Clarion$is_delimited(x)
xName of the column.
boolean
get_factors()Get factors to all columns.
Clarion$get_factors()
Named factors (e.g. factor1="name") will be cropped to their name.
Returns a data.table columns: key and factor(s) if any.
get_level()Get level(s) to given column name(s).
Clarion$get_level(column)
columnOne or more column name(s).
Provide a vector of levels to the given columnnames in column. Returns NA for missing columns and character(0) if column = NULL.
get_label()Get label(s) to given column name(s).
Clarion$get_label(column = NULL, sub_label = TRUE, sep = " ")
columnOne or more column name(s).
sub_labelWhether the sub_label should be included.
sepSeparator between label and sub_label.
If a column does not have a label the key is returned.
Provides a vector of labels (+ sub_label) to the given columnnames in column. Returns NA for missing columns and all labels if column = NULL.
validate()Check the object for inconsistencies.
Clarion$validate(solve = TRUE)
solveFor solve = TRUE try to resolve some warnings.
new()Initialize a new clarion object.
Clarion$new(header = NULL, metadata, data, validate = TRUE)
headerA named list. Defaults to NULL.
metadataClarion metadata in form of a data.table.
dataData.table according to metadata.
validateLogical value to validate on initialization. Defaults to TRUE.
Clarion object.
write()Save the object as a clarion file.
Clarion$write(file)
fileFilename for the file to be written.
clone()The objects of this class are cloneable with this method.
Clarion$clone(deep = FALSE)
deepWhether to make a deep clone.
# NOT RUN {
# initializing a new object
object <- Clarion$new(header, metadata, data, validate = TRUE)
# create a deep copy
object_copy <- object$clone(deep = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab