| design | R Documentation |
Launch an interactive Shiny Studio for study-design guidance, sample-size planning, probability sampling, and random allocation. The working areas are independent: users may open any area directly and may optionally reuse or save results in one R4VN design project.
design(
data = NULL,
project_name = "Untitled Study",
launch.browser = interactive(),
port = NULL,
host = "127.0.0.1"
)
data |
Optional data.frame used as the initial sampling/participant list. |
project_name |
Initial project name shown in the Studio. |
launch.browser |
Passed to |
port |
Optional port passed to |
host |
Host passed to |
design() contains four independent working areas:
A guided cascade that recommends a design and explains why.
A searchable registry of formula-, precision-, power-, and model-based sample-size methods. Results include a formula or method rule, numerical substitution when available, calculation steps, adjustments, sensitivity analyses, references, and a Methods statement.
Simple, systematic, stratified, PPS, cluster, and multistage sampling from an uploaded frame or, for methods that do not require frame variables, directly from generated IDs 1...N.
Simple, complete, permuted-block, and stratified-block random allocation from a participant list or from generated participant numbers, with reproducibility metadata and printable allocation lists.
Word export uses rmarkdown/Pandoc so mathematical formulas are exported as
formatted Word equations. PDF export prefers pagedown with Chrome and uses
a LaTeX fallback when necessary. Excel templates/workbooks use openxlsx.
Advanced sample-size methods use method-specific packages when available,
including presize, WebPower, statpsych, TrialSize, and pmsampsize.
The Studio reports the method/reference used rather than silently replacing
an unavailable advanced method with an unrelated approximation.
Invisibly returns the Shiny app result when the app exits.
if (interactive()) {
design()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.