Learn R Programming

specmine (version 3.1.6)

compare_regions_by_sample: Compare regions by sample

Description

Compare two regions of a dataset by samples.

Usage

compare_regions_by_sample(dataset1, dataset2, fn.to.apply, 
samples = NULL, ...)

Arguments

dataset1

list representing the dataset from a metabolomics experiment.

dataset2

list representing the dataset from a metabolomics experiment.

fn.to.apply

function to apply (e.g. mean, max, min).

samples

if defined restricts the application to a given set of samples.

additional parameters to apply.by.sample function.

Value

Returns a data.frame with the results of the function applied to the samples and the ration between the two datasets.

Examples

Run this code
# NOT RUN {
     ## Example of comparing regions by sample
	 library(specmine.datasets)
     data(cachexia)
     subset1 = subset_x_values(cachexia, 1:31, by.index = TRUE)
     subset2 = subset_x_values(cachexia, 32:63, by.index = TRUE)
     comp.regions.result = compare_regions_by_sample(subset1, subset2, 
			   mean)
# }

Run the code above in your browser using DataLab