diffAdats {SomaDataIO} | R Documentation |
Diff Two ADAT Objects
Description
Diff tool for the differences between two soma_adat
objects.
When diffs of the table values are interrogated, only
the intersect of the column meta data or feature data is considered
Usage
diffAdats(adat1, adat2, tolerance = 1e-06)
Arguments
adat1 , adat2 |
Two |
tolerance |
Numeric |
Value
NULL
, invisibly. Called for side effects.
Note
Only diffs of the column name intersect are reported.
Author(s)
Stu Field
Examples
# subset `example_data` for speed
# all SeqIds from 2000 -> 2999
seqs <- grep("^seq\\.2[0-9]{3}", names(example_data), value = TRUE)
ex_data_small <- head(example_data[, c(getMeta(example_data), seqs)], 10L)
dim(ex_data_small)
# no diff to itself
diffAdats(ex_data_small, ex_data_small)
# remove random column
rm <- withr::with_seed(123, sample(1:ncol(ex_data_small), 1))
diffAdats(ex_data_small, ex_data_small[, -rm])
# randomly shuffle Subarray
diffAdats(ex_data_small, dplyr::mutate(ex_data_small, Subarray = sample(Subarray)))
# modify 2 RFUs randomly
new <- ex_data_small
new[5L, c(rm, rm + 1L)] <- 999
diffAdats(ex_data_small, new)
[Package SomaDataIO version 6.1.0 Index]