View source: R/generic.pipeflow.R
| dim.pipeflow | R Documentation |
Treats a pipeline as a table of steps: length() and nrow() return the
number of steps, ncol() returns the number of columns of the underlying
step table, and dim() returns both. Views report only the steps covered
by the view.
## S3 method for class 'pipeflow'
length(x)
## S3 method for class 'pipeflow'
dim(x)
x |
A pipeflow pipeline or view |
length(), nrow(): the number of steps
ncol(): the number of columns of the step table
dim(): vector with the number of steps and columns.
base::dim(), base::nrow(), base::length()
p <- pip_new() |>
pip_add("s1", \(x = 1) x) |>
pip_add("s2", \(x = ~s1) x + 1) |>
pip_add("s3", \(x = ~s2) x * 2)
dim(p)
nrow(p)
ncol(p)
length(p)
length(p) == nrow(p) # TRUE
# A view reports only the number of selected (visible) steps
v <- pip_view(p, step = c("s2", "s3"))
length(v) # 2
nrow(v) # 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.