View source: R/addSampleSizes.R
| addSampleSizes | R Documentation |
Function to add sample sizes to "size" compositions in a dataframe.
addSampleSizes(
dfr,
id.facs = NULL,
id.size = "size",
id.value = "N",
dfrSS = NULL,
id.ss = "ss",
verbose = FALSE
)
dfr |
- input dataframe with composition data by "size" and other factors |
id.facs |
- character vector of column names used as factors in calculating the sample sizes (or NULL) |
id.size |
- name of column in dfr with "size" data |
id.value |
- name of column in dfr with count data |
dfrSS |
- previously calculated dataframe with sample sizes by "other factors" (or NULL) |
id.ss |
- name of column in dfrSS with sample sizes |
verbose |
- flag to print diagnostic output to console |
Non-standard column names SHOULD NOT be back-quoted. If dfrSS is
provided, it will be used as the source of the sample size information (useful
for appending modified sample sizes to size compositions); otherwise, "raw"
sample sizes are calculated directly from dfr.
dataframe with original size compositions and sample sizes in column "ss".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.