variation_shared_by: Return a specific variation component

Description Usage Arguments Value Examples

Description

Variation can be shared by: 'all' all datasets 'subset' a subset of the datasets (excluding variation already in 'all') 'all_and_subset' a union of the above

The returned data never contains noise (which is considered to be part of each datasets unique variation). The linear toy datasets do not contain variation unique to a dataset other than pure noise.

Usage

1
variation_shared_by(dc, type, center = T, scale = F)

Arguments

dc

A data collection from one of the create_syn_data_*() functions

type

Type of variation to extract, allowed values c('all','subset','all_and_subset')

center

(optional) Should the output data be centered?

scale

(optional) Should the output data be scaled?

Value

A list of data.frames containing the desired variation component

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
dc <- create_syn_data_toy()
ldSharedByAll = variation_shared_by(dc, "all", center = F)
ldSharedBySome = variation_shared_by(dc, "subset", center = F)
ldNonUnique = variation_shared_by(dc, "all_and_subset", center = F)
dNoise <- mapply(function(x,y){x-y}, x=dc$data, y=ldNonUnique, SIMPLIFY = F)
ggplot_dclst(list(observed = dc$data,
                 shared.by.all = ldSharedByAll,
                 shared.by.some = ldSharedBySome,
                 noise = dNoise),
             ylim = c(-3, 3))

## End(Not run)


Search within the cocoreg package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.