
Helper function to get unique values for a variable
Source:R/get_unique_variables.R
get_unique_variables.RdHelper function to get unique values for a variable
Usage
get_unique_variables(
data = NULL,
variable = NULL,
format = c("table", "vector")
)Arguments
- data
tidyproteomics data object
- variable
a string character
- format
a character string specifying the return format: "table" (default) or "vector"
Examples
library(tidyproteomics)
get_unique_variables(hela_proteins, "sample")
#> # A tibble: 2 × 1
#> value
#> <chr>
#> 1 control
#> 2 knockdown
get_unique_variables(hela_proteins, "sample", format = "vector")
#> [1] "control" "knockdown"