Description Usage Arguments Value Examples
Helper function to count cancer cases in the FCDS data by year and age group,
in addition to any groups already present in the data. For convenience, you
may additionally filter to include particular values of sex, race, year,
county name and hispanic ethnicity. See fcds_const()
for more information
about possible values for these variables. By default, count_fcds()
ensures
that age_group
, year_group
, and year
are included in the grouping
variables if they are present in the data. If they are not, or if they are
not present in the FCDS data, then it would be better to use dplyr::count()
directly.
1 2 3 4 |
data |
A data frame |
... |
Unquoted column names to be added to the grouping of the output and subsequent counting. |
sex |
Character vector of values of |
race |
Character vector of values of |
origin |
Character vector of values of |
county_name |
Character vector of values of |
default_groups |
Variables that should be included in the grouping,
prior to counting cancer cases. Set to |
discard_unseen_levels |
If |
moffitt_catchment |
Deprecated. Please use |
A grouped data frame with counts. The output groups includes the
union of the groups of the original input data
, the groups specified by
the columns indicated in ...
, and the default_groups
added by
count_fcds()
(modifyable by the default_groups
argument).
All factor levels will be modified to include only those levels that appear in the final output across all groups.
1 2 3 4 5 6 7 8 9 10 11 12 | fcds_example %>%
dplyr::filter(county_name == "Pinellas") %>%
count_fcds(cancer_site_group, sex = "Male", county_name = TRUE) %>%
head()
fcds_example %>%
filter_age_groups(age_gt = 20, age_lt = 25) %>%
count_fcds(sex = TRUE, county_name = c("Pinellas", "Hillsborough"))
fcds_example %>%
count_fcds(county_name = "moffitt") %>%
head()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.