View source: R/cadra_functions.R
generate_permutations | R Documentation |
Produces a random permutation score matrix given a vector of sample-specific scores representing a phenotypic readout of interest such as protein expression, pathway activity, etc.
generate_permutations(input_score, n_perm)
input_score |
a vector of continuous scores of a molecular phenotype of
interest such as protein expression, pathway activity, etc.
NOTE: The |
n_perm |
a number of permutations to generate. This determines the number of rows in the permutation matrix. |
a matrix of values where each row contains scores of a single
permuted input_score
.
# Load pre-simulated scores
data(sim_Scores)
# Set seed for permutation
set.seed(123)
# Define number of permutations
n_perm = 1000
# Generate permuted scores
perm_matrix <- generate_permutations(
input_score = sim_Scores,
n_perm = n_perm
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.