nb_dist: Calculate distance (external wrapper for internal C++...

Description Usage Arguments Value Examples

View source: R/netboost.R

Description

Calculate distance (external wrapper for internal C++ function) Parallelisation inside C++ program with RcppParallel.

Usage

1
2
3
nb_dist(filter, datan, soft_power = 2, cores = getOption("mc.cores",
  2L), verbose = getOption("verbose"), method = c("pearson", "kendall",
  "spearman"))

Arguments

filter

Filter-Matrix as generated by the nb_filter function.

datan

Data frame were rows correspond to samples and columns to features.

soft_power

Integer. Exponent of the transformation. Set automatically based on the scale free topology criterion if unspecified.

cores

Integer. Amount of CPU cores used (<=1 : sequential).

verbose

Additional diagnostic messages.

method

A character string specifying the method to be used for correlation coefficients.

Value

Vector with distances.

Examples

1
2
3
4
5
6
7
8
 data('tcga_aml_meth_rna_chr18', package='netboost')
 cores <- as.integer(getOption('mc.cores', 2))
 datan <- as.data.frame(scale(tcga_aml_meth_rna_chr18, center=TRUE,
 scale=TRUE))
 filter <- nb_filter(datan=datan, stepno=20L, until=0L, progress=1000L,
 cores=cores,mode=2L)
 dist <- nb_dist(datan=datan, filter=filter, soft_power=3L, cores=cores)
 summary(dist)

netboost documentation built on Nov. 8, 2020, 4:58 p.m.