Description Usage Arguments Examples
View source: R/make_my_data2L.R
Currently only works with data with 2-levels. Notes that if the size of the dataframe is too small to accomodate n.sample then with.rep is set to TRUE.
1 2 3 4 5 6 7 | make_my_data2L(
dat,
my.code = "nlb24",
cat.var,
n.sample = 20,
with.rep = FALSE
)
|
dat |
R dataframe to randomly subset |
my.code |
Unique code, such as your email address. Must contain only letters and numbers and not the at symbol or other punctuation. |
cat.var |
Categorical variable by which to split the data up |
n.sample |
Number of samples per group to randomly select. 2*n.sample will be the total size of the dataframe. |
with.rep |
Should sampling be with replacement? If with.rep = TRUE then individuals can occur more than once within the dataframe. |
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.