View source: R/data_manipulation_functions.R
create_plot_df_from_count_df | R Documentation |
The name column is filtered for only values that equal the column_value.
create_plot_df_from_count_df(column, count_column, data)
column |
A value that exists in the "name" column of the data |
count_column |
A string that is the new column name |
data |
A tibble |
The name and value column are pivoted so that a new column is created that has the name of the column value. The number of rows will equal the number of unique value in the value column, where the name column is equal to the column_value
Finally the counts column is renamed the using the count_column
data <- dplyr::tribble( ~studyName, ~name, ~value, ~count, "s1", "assay", "immunohistochemistry", 395L, "s1", "resourceType", "experimentalData", 416L, "s1", "resourceType", "report", 12L, "s1", "species", "Human", 421L, "s1", "tumorType", "Cutaneous Neurofibroma", 387L ) create_plot_df_from_count_df("assay", "Assays", data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.