Learn R Programming

specmine (version 3.1.6)

linregression_onevar: Linear regression on one variable

Description

Performs linear regression on one variable of the dataset.

Usage

linregression_onevar(dataset, x.val, metadata.vars, combination)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

x.val

the x-value to be tested.

metadata.vars

metadata variables to use in linear regression. For example, c('variable1','variable2').

combination

a formula specifying the model. For example, 'variable1+variable2'.

Value

Returns a summary of the result from the lm function from stats package.