study_count: Count the Number of Unique Observations in a Dataset or...

View source: R/study_count.R

study_countR Documentation

Count the Number of Unique Observations in a Dataset or Subset

Description

This function simplifies the process of counting the number of unique observations in a dataset or a subset by avoiding repetitive use of summarise('N (unique)' = n_distinct(counting_var)).

Usage

study_count(dataset, counting_var = "unique_study_id")

Arguments

dataset

The dataset or subset.

counting_var

The variable to count unique observations (default: "unique_study_id").

Value

A tibble with the count of distinct observations.


setgree/PrejMetaFunctions documentation built on April 28, 2024, 9:29 a.m.