Description Usage Arguments Value DETAILS Author(s) See Also Examples
Test the independence of 2 sets of distances with the coin package (only returns the p-value)
1 | coinIndep(.x, .y)
|
.x |
A data frame with distances for the gene set of interest. |
.y |
A data frame with distances for the control/reference gene set. |
The p-value of the independence test from the coin package.
Both .x
and .y
should contain at least the following columns:
Distance. Distance in bp.
GeneName. Name of the focus gene.
GeneSet. Name of the Gene Set
Pascal GP Martin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Create some random distance data
set.seed(123)
mydistData <- data.frame(GeneName = stringi::stri_rand_strings(400, 5),
Distance = sample(1:5000, 400, replace=TRUE),
GeneSet = sample(c("TestSet", "RefSet"),
400, replace= TRUE))
## Compute the p-value of the independence test
coinIndep(.x = mydistData[mydistData$GeneSet == "TestSet",],
.y = mydistData[mydistData$GeneSet == "RefSet",])
## If .x is empty, the function returns NA
coinIndep(.x = mydistData[mydistData$GeneSet == "SomeRandomName",],
.y = mydistData[mydistData$GeneSet == "RefSet",])
## If .y is empty, the function returns an error
## Not run:
coinIndep(.x = mydistData[mydistData$GeneSet == "TestSet",],
.y = mydistData[mydistData$GeneSet == "SomeRandomName",])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.