colTest: Perform a simple wilcoxon-rank-sum test or t-test on the...

colTestR Documentation

Perform a simple wilcoxon-rank-sum test or t-test on the columns of a data fram

Description

Perform a simple wilcoxon-rank-sum test or t-test on the columns of a data fram

Usage

colTest(df, condition, type = "wilcox", feature = NULL, imageID = "imageID")

Arguments

df

A data.frame or SingleCellExperiment, SpatialExperiment

condition

The condition of interest

type

The type of test, "wilcox" or "ttest"

feature

Can be used to calculate the proportions of this feature for each image

imageID

The imageID's if presenting a SingleCellExperiment

Value

Proportions

Examples


# Test for an association with long-duration diabetes
# This is clearly ignoring the repeated measures...
data("diabetesData")
props <- getProp(diabetesData)
condition <- imagePheno(diabetesData)$stage
names(condition) <- imagePheno(diabetesData)$imageID
condition <- condition[condition%in% c("Long-duration", "Onset")]
test <- colTest(props[names(condition), ], condition)

ellispatrick/spicyR documentation built on Nov. 22, 2022, 10:45 p.m.