Learn R Programming

misha (version 5.11.23)

gintervals.attr.import: Imports interval set attributes values

Description

Imports interval set attributes values.

Usage

gintervals.attr.import(table = NULL, remove.others = FALSE)

Value

None.

Arguments

table

a data frame containing attribute values

remove.others

specifies what to do with the attributes that are not in the table

Details

This function imports attribute values contained in a data frame 'table'. The format of a table is similar to the one returned by 'gintervals.attr.export'. The values of the table must be character strings. Column names of the table should specify the attribute names, while row names should contain the interval set names.

The specified attributes of the specified interval sets are modified. If an attribute value is an empty string this attribute is removed from the interval set.

If 'remove.others' is 'TRUE' all attributes that do not appear in the table are removed, otherwise they are preserved unchanged.

See Also

gintervals.attr.export, gintervals.attr.set, gintervals.attr.get

Examples

Run this code
# \dontshow{
options(gmax.processes = 2)
# }

gdb.init_examples()
t <- data.frame(
    myattr = "val1", row.names = "annotations",
    stringsAsFactors = FALSE
)
gintervals.attr.import(t)
gintervals.attr.export(attrs = "myattr")

# roll-back the changes
t$myattr <- ""
gintervals.attr.import(t)

Run the code above in your browser using DataLab