| sub-.bucss_plan | R Documentation |
Row and column subsetting returns a plain data.frame. The class is
dropped first so that [.data.frame's internal column extraction
(which uses [[ on columns 1 and 2) cannot collide with the legacy
positional [[ contract (see [[.bucss_plan); without
this, head(result) and result[i, ] would silently return the
legacy scalars in place of the term and value columns. A
subset is no longer the full planning result (its attributes and print
contract no longer apply), so the return is an ordinary data.frame.
## S3 method for class 'bucss_plan'
x[...]
## S3 replacement method for class 'bucss_plan'
x[i, j] <- value
## S3 replacement method for class 'bucss_plan'
x[[i, j]] <- value
## S3 replacement method for class 'bucss_plan'
x$name <- value
## S3 replacement method for class 'bucss_plan'
names(x) <- value
## S3 method for class 'bucss_plan'
rbind(..., deparse.level = 1)
x |
A |
... |
Passed to the |
i, j, value |
Passed to the |
deparse.level |
Passed to the |
Modifying or stacking a result does the same. Assignment through
[<-, [[<-, $<-, and names<- (and so
colnames<- and setNames()), and rbind(), all return an
ordinary data.frame without the print, tidy(),
glance(), or positional [[ behavior. Assigning to
result[[1]] or result[[2]] is refused with an error, because
reading those subscripts gives the legacy scalars while assigning to them
would overwrite the term or value column.
A data.frame (or vector, under the usual drop rules).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.