filter_longitudinal {coda4microbiome}R Documentation

filter_longitudinal

Description

Filters those individuals and taxa with enough longitudinal information

Usage

filter_longitudinal(
  x,
  taxanames = NULL,
  x_time,
  subject_id,
  metadata,
  ini_time = min(x_time),
  end_time = max(x_time),
  percent_indv = 0.7,
  min_obs = 3
)

Arguments

x

abundance matrix or data frame in long format (several rows per individual)

taxanames

names of different taxa

x_time

observation times

subject_id

subject id

metadata

matrix sample data

ini_time

initial time to be analyzed

end_time

end time to be analyzed

percent_indv

percentage of individuals with more than min_obs observations

min_obs

required minimum number of observations per individual

Value

list with filtered abundance table, taxanames and metadata

Author(s)

M. Calle - T. Susin

Examples


data(ecam_filtered, package = "coda4microbiome")   # load the data

x=x_ecam # microbiome abundance
x_time = metadata$day_of_life    # observation times
subject_id = metadata$studyid   # subject id
ini_time = 0
end_time = 360

data_filtered<-filter_longitudinal(x,taxanames,x_time, subject_id, metadata,
                                              ini_time, end_time, min_obs=4)



[Package coda4microbiome version 0.2.4 Index]