| [[.bucss_plan | R Documentation |
Backward-compatible positional extraction for
bucss_plan objects. The deprecated 1.x functions (see
bucss-deprecated) returned an unnamed two-element list,
list(sample_size, ncp), so code written for BUCSS 1.x reads
result[[1]] and result[[2]]. The ss_buc_* functions
return a richer object, but result[[1]] still yields the necessary
sample size and result[[2]] the bias and uncertainty adjusted
noncentrality parameter, so that 1.x extraction code keeps working.
Any other subscript (a column name, or a length other than one) falls
through to the ordinary data.frame method, so result[["value"]]
and result$value are unaffected.
The legacy reading applies only to an object that still has the shape of
a single plan, as its planner returned it. An object that keeps the class
without that shape (several plans stacked together, or a plan with rows
removed, which some data manipulation tools leave in the class) is read
as the plain data.frame it is, so [[1]] and [[2]]
give its term and value columns rather than one plan's
sample size and noncentrality parameter.
## S3 method for class 'bucss_plan'
x[[i, ...]]
x |
A |
i |
A subscript. A single double |
... |
Passed to the |
For i equal to the double 1 or 2 and an object
with the shape of a single plan, a single numeric value; otherwise
whatever the data.frame [[ method returns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.