
Prepare booklet specifications from a tabular block design
prepare_booklets_from_block_design.RdPrepare booklet specifications from a tabular block design
Usage
prepare_booklets_from_block_design(
booklets,
blocks,
units,
restrictions = NULL,
booklet_subject_fn = NULL,
add_start_end = TRUE,
booklet_filter = NULL,
wrap_blocks = TRUE,
default_leave = NULL,
keep_leave_without_minutes = FALSE
)Arguments
- booklets
A tibble with one row per booklet. It must contain either
booklet_idorbookletand one or moreblock_*columns containing the block ids in booklet order.booklet_label,booklet_description, andbooklet_configurationare optional.- blocks
A tibble with one row per block. It must contain
blockand may containsubject,domain,minutes,testlet_id,testlet_label, andwrap. Missingsubjectordomainvalues apply to all matching unit subjects or domains.- units
A tibble with one row per unit. It must contain
blockandunit_key;subject,domain,sequence,unit_alias,unit_label, andunit_labelshortare optional.- restrictions
An optional tibble with testlet restriction information. It may contain
booklet_id,subject,domain,block,testlet_id,testlet_label,minutes,leave,code,code_to_enter,presentation,response, andwrap. Missingsubjectordomainvalues apply to all matching unit subjects or domains. It can also use the compact timing formatdesign,block,seconds, and optionalblock_groupandleave.designis matched as an underscore-delimited part ofbooklet_id.blockcontains one booklet position column, such as"block_4". Ifblock_groupis present, rows with the samedesignandblock_groupare combined into one timed testlet andblock_groupis used as the testlet label. Ifblock_groupis missing or empty, eachblockbecomes its own timed testlet. Ifleaveis missing or empty in this compact format, it defaults to"allowed".- booklet_subject_fn
Optional function that receives
booklet_idand returns a subject used to disambiguate blocks that exist for several subjects.- add_start_end
Logical. Should
Start_pageandEnd_pageunits be added to every booklet?- booklet_filter
Optional character vector of booklet ids to keep.
- wrap_blocks
Logical. Should blocks be wrapped into testlets by default?
- default_leave
Optional default value for the
leaveattribute ofTimeMaxrestrictions.- keep_leave_without_minutes
Logical. Should
leavebe kept when nominutesrestriction is present?
Value
A tibble that can be passed to generate_booklets().