sample: sample

Description Usage Arguments

View source: R/sampling.R

Description

Sample the table of scores or clusters of it according to different methods of selection

Usage

1
2
sample(x, partition = NULL, methods = "downsampling", target_ratio = 0.1,
  target_nb = NULL)

Arguments

x

data.frame, a table of scores

partition

vector containing the partition of table x.

If partition is passed to this function, each cluster will be sampled instead of the whole table.

Each element of the partition vector must be a cluster ID and length(partition) must be equal to nrow(x).

methods

method or vector of methods to be used for the sampling.

Methods available:

  • "downsampling"

  • "lowsampling"

  • "upsampling"

  • "centroids"

  • "medoids"

See Details to have the description of the methods

target_ratio

percentage of gene pairs to be retained in x (if partition is NULL) or in each cluster of x (if partition is NOT NULL)

argument target_ratio will be ignored if argument target_nb is provided

target_nb

number of gene pairs to be retained in x (if partition is NULL) or in each cluster of x (if partition is NOT NULL)


charles-bernard/mage documentation built on May 14, 2019, 2 a.m.