Description Usage Arguments Examples
Please refer to the file /inst/doc/readme.pdf.
1 |
data |
|
method |
|
rounds |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (data, method = c("spearman", "pearson", "kendall"),
rounds = 1e+06)
{
sp_result <- NULL
method <- match.arg(method)
for (i in 1:rounds) {
rg1 <- sample(1:nrow(data), size = 1)
rg2 <- sample(1:nrow(data), size = 1)
while (rg1 == rg2) {
rg2 <- sample(1:nrow(data), size = 1)
}
gene1 <- unlist(data[rg1, ])
gene2 <- unlist(data[rg2, ])
sp_value <- cor(gene1, gene2, method = method)
sp_result <- c(sp_result, sp_value)
}
return(sp_result)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.