v_count | R Documentation |
Constructors and methods for a count data type. v_count
and
cnt
are synonyms that each create a new v_count
object
subclassed from vctrs_vctr
.
Support: the non-negative Integers* (plus NA_integer_
)
Prototype: integer
* - i.e. the natural numbers including 0
v_count( x = ptypeFUN(), internal_name = "", context, auto_compute_summary = auto_compute_default, extra_descriptors = list() ) cnt( x = ptypeFUN(), internal_name = "", context, auto_compute_summary = auto_compute_default, extra_descriptors = list() ) is_count(x) as_count(x) ## S3 method for class 'v_count' as.character(x, ...) as_canonical(x) ## S3 method for class 'v_count' as_canonical(x)
x |
a |
internal_name |
the internal name of the variable |
context |
a |
auto_compute_summary |
an indicator of whether the |
extra_descriptors |
A |
... |
passed to other methods such as |
Other stype types:
tbl_analysis
,
v_binary
,
v_continuous_nonneg
,
v_continuous
,
v_nominal
,
v_ordered
,
v_proportion
,
v_rcensored
# Example data src_count <- seq_len(5L) # Constructor for the `v_count` class. One can also use `cnt` which is a # synonym for the `v_count` function. v <- v_count( x = src_count, internal_name = "v_example", context = context( short_label = "important_var", long_label = "Very important variable" ), extra_descriptors = list() ) # Helper functions and methods is_count(v) as_count(src_count) as.character(v) as_canonical(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.