is_intact_attr {SomaDataIO} | R Documentation |
Are Attributes Intact?
Description
This function runs a series of checks to determine
if a soma_adat
object has a complete
set of attributes. If not, this indicates that the object has
been modified since the initial read_adat()
call.
Checks for the presence of both "Header.Meta" and "Col.Meta" in the
attribute names. These entries are added during the
read_adat()
call. Specifically, within these sections
it also checks for the presence of the following entries:
- "Header.Meta" section:
"HEADER", "COL_DATA", and "ROW_DATA"
- "Col.Meta" section:
"SeqId", "Target", "Units", and "Dilution"
If any of the above they are altered or missing, FALSE
is returned.
is.intact.attributes()
is .
It remains for backward compatibility and may be removed in the future.
You are encouraged to shift your code to is_intact_attr()
.
Usage
is_intact_attr(adat, verbose = interactive())
is.intact.attributes(adat, verbose = interactive())
Arguments
adat |
A |
verbose |
Logical. Should diagnostic information about failures
be printed to the console? If the default, see |
Value
Logical. TRUE
if all checks pass, otherwise FALSE
.
See Also
Examples
# checking attributes
my_adat <- example_data
is_intact_attr(my_adat) # TRUE
is_intact_attr(my_adat[, -303L]) # doesn't break atts; TRUE
attributes(my_adat)$Col.Meta$Target <- NULL # break attributes
is_intact_attr(my_adat) # FALSE (Target missing)