PreparingTheData {CoDaLoMic}R Documentation

Preparing dataset

Description

Preparing the dataset to be introduce in the models' functions. In order to introduce the usage of the package there is a README file. You can find the link to the file using base::system.file("extdata", "README.pdf", package = "CoDaLoMic"). On windows you can open the file with base::shell.exec(system.file("extdata", "README.pdf", package = "CoDaLoMic")).

Usage

PreparingTheData(DaTa, Pred)

Arguments

DaTa

data.frame. The first column contains the time point information (natural numbers 1,2,3...). The rest of the columns contain the relative abundance of each bacteria at the different time points. The values of each column must sum 1.

Pred

Number. The data at t=1,...,Pred-1 will be used to estimate the model. The rest of the time points will be used to study the capacity of the model to predict. If Pred==0 all the datatset will be used to estimate the model.

Value

If Pred==0 returns a list with

If Pred!=0 returns a list with

Examples



df<-data.frame(cbind(c(1,2,3),
                     c(0.5,0.2,0.3),
                     c(0.2,0.1,0.6),
                     c(0.1,0.1,0.8),
                     c(0.3,0.3,0.4)))
PreparingTheData(df,Pred=0)

df2<-data.frame(cbind(c(1,2,3,4,5),
                      c(0.1,0.1,0.1,0.2,0.5),
                      c(0.2,0.2,0.2,0.2,0.2),
                      c(0.2,0.3,0.1,0.2,0.2)))
PreparingTheData(df2,Pred=4)

[Package CoDaLoMic version 0.1.1 Index]