mulset: A mulset function

Description Usage Arguments Details Value Examples

View source: R/mulset.R

Description

mulset() returns all multi-set intersections

Usage

1
2
mulset(data, exclude = NULL, include = c("samples", "samples_count",
  "datapoints"), maxIntersections = NULL, hashMethod = "md5")

Arguments

data

Data frame containing your data

exclude

Vector containing one or more variable names from names(data)

include

List of attributes which will be shown in results. Possible values are: c("samples", "samples_count", "datapoints"). If parameter is set to NULL only c("features", "feature_count") will be returned.

maxIntersections

Maximum number of unique datasets to generate, if NULL all datasets will be generated

hashMethod

Hashing method to use for unique sets identification. Available choices: md5(default), sha1, crc32, sha256, sha512, xxhash32, xxhash64, murmur32

Details

This function allows you to generate specific type of multi-set intersections. It searches for multi set intersections between rows and column identifiers. If no NA values are present only 1 dataset is returned as expected.

Value

If any intersections are found it returns a list that contains all available multi-set intersections You can convert this to data-frame following example provided or use it as it is.

Examples

1
2
3
4
5
data(mulsetDemo)
print(head(mulsetDemo))
resamples <- mulset(mulsetDemo, exclude = c("outcome", "age", "gender"), maxIntersections = 250)
## Loop through returned list or convert it to data-frame
## resamplesFrame <- as.data.frame(t(sapply(resamples,c)))

Example output

  outcome age gender Feature 7 Feature 3 Feature 4 Feature 5
1     low  77   male        NA         0        28         5
2    high  61 female         7        NA        28         5
3     low  58 female        91        10        NA        18
4    high  90   male        20         0         5        NA

mulset documentation built on May 2, 2019, 12:37 p.m.