View source: R/compute_subsample.R
| compute_subsample | R Documentation |
Selects a random subset of columns within each block of the input data matrix.
compute_subsample(data, block_ind, n, sample_size = 1, seed = NULL)
data |
A numeric matrix or data frame containing the original data. |
block_ind |
Integer vector specifying the end indices of each block. If |
n |
Integer specifying the number of blocks. |
sample_size |
Numeric between 0 and 1 specifying the proportion of columns to sample within each block. Defaults to 1 (all columns). |
seed |
Optional integer. Seed for reproducibility of the column sampling. If |
A list with two elements:
A numeric matrix combining the sampled columns from all blocks.
An integer vector containing the indices corresponding to the sampled data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.