Learn R Programming

Introduction

LongDat R package takes longitudinal dataset as input data and analyzes if there is significant change of the features over time (proxy for treatments), while detects and controls for covariates at the same time. LongDat is able to take in several data types as input, including count, proportion, binary, ordinal and continuous data. The output table contains p values, effect sizes and covariates of each feature, making the downstream analysis easy.

Install

Install LongDat by typing install.packages("LongDat") in R.

If you encounter errors like the one below when installing the package
Error: package or namespace load failed for ‘LongDat’ object ‘A’ is not exported by 'namespace:B_package'
please try install the dependency B_package first, and then try to install LongDat again. An example to this kind of problem and solution can be found here

Tutorial

Tutorials for the analysis on continuous time variable (e.g. days) can be found here.

Tutorials for the analysis on discrete time variable (e.g. before/after treatment) can be found here.

Alternatively, you can type browseVignettes(“LongDat”) in R after installing LongDat to access these tutorials.

Citation

The paper will be added here once it is published. Before that, please cite:
Chen et al., ( 2022 ). LongDat: an R package for confound-sensitive longitudinal analysis on multi-omics data.

Copy Link

Version

Install

install.packages('LongDat')

Monthly Downloads

623

Version

1.1.2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Chia-Yu Chen

Last Published

July 17th, 2023

Functions in LongDat (1.1.2)

LongDat_disc_master_table

data/LongDat_disc_master_table.RData documentation
longdat_disc

Longitudinal analysis with time as discrete variable
longdat_cont

Longitudinal analysis with time as continuous variable
random_neg_ctrl_disc

Randomized negative control for count data in longdat_disc()
LongDat_disc_metadata_table

data/LongDat_disc_metadata_table.RData documentation
LongDat_cont_feature_table

data/LongDat_cont_feature_table.RData documentation
LongDat_cont_master_table

data/LongDat_cont_master_table.RData documentation
rm_sparse_cont

Remove the dependent variables that are below the threshold of sparsity when the data type is count data in longdat_cont()
factor_p_cal

Calculate the p values for every factor (used for selecting factors later)
theta_plot

Plot theta values of negative binomial models versus non-zero count for count data
rm_sparse_disc

Remove the dependent variables that are below the threshold of sparsity when the data type is count data in longdat_disc()
wilcox_posthoc

Wilcoxon post-hoc test
unlist_table

Unlist confound (covariate) and inverse confound (covariate) tables, turn them into tables
final_result_summarize_cont

Generate result table as output in longdat_cont()
final_result_summarize_disc

Generate result table as output in longdat_disc()
cliff_cal

Effect size (Cliff's delta) calculation in longdat_disc() pipeline
LongDat_disc_feature_table

data/LongDat_disc_feature_table.RData documentation
correlation_posthoc

Post-hoc test based on correlation test for longdat_cont().
LongDat_cont_metadata_table

data/LongDat_cont_metadata_table.RData documentation
fix_name_fun

Replace the symbols in variable and covariate names in raw input
cuneiform_plot

Create cuneiform plots of result table from longdat_disc() or longdat_cont()
data_preprocess

Data preprocessing
random_neg_ctrl_cont

Randomized negative control for count data in longdat_cont()
make_master_table

Create input master table from metadata and feature tables for longdat_disc() and longdat_cont()
ConModelTest_cont

Covariate model test in longdat_cont() pipeline
NuModelTest_disc

Null Model Test and post-hoc Test in longdat_disc() pipeline
NuModelTest_cont

Null Model Test and post-hoc Test in longdat_cont() pipeline
ConModelTest_disc

Covariate model test in longdat_disc() pipeline