| n | R Documentation | 
This function returns the number of entities in a PGS Catalog object. To
avoid ambiguity with dplyr::n() use quincunx::n().
n(x, unique = FALSE) ## S4 method for signature 'scores' n(x, unique = FALSE) ## S4 method for signature 'publications' n(x, unique = FALSE) ## S4 method for signature 'traits' n(x, unique = FALSE) ## S4 method for signature 'performance_metrics' n(x, unique = FALSE) ## S4 method for signature 'sample_sets' n(x, unique = FALSE) ## S4 method for signature 'cohorts' n(x, unique = FALSE) ## S4 method for signature 'trait_categories' n(x, unique = FALSE) ## S4 method for signature 'releases' n(x, unique = FALSE)
x | 
 A scores, publications, traits, performance_metrics, sample_sets, cohorts, trait_categories or releases object.  | 
unique | 
 Whether to count only unique entries (  | 
An integer scalar.
# Return the number of polygenic scores in a scores object:
my_scores <- get_scores(pgs_id = c('PGS000007', 'PGS000007', 'PGS000042'))
n(my_scores)
# If you want to count unique scores only, then use the `unique` parameter:
n(my_scores, unique = TRUE)
# Total number of curated publications in the PGS Catalog:
all_pub <- get_publications(interactive = FALSE, progress_bar = FALSE)
n(all_pub)
# Total number of curated traits in the PGS Catalog:
all_traits <- get_traits(interactive = FALSE, progress_bar = FALSE)
n(all_traits)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.