Description Usage Arguments Examples
View source: R/calc_row_frequency.R
Identified samples for each group, reads rows and calculates the number of values above a certain threshold.
1 2 | calc_row_frequency(x, sample_vector, group_vector, label = "f_",
complete_match = FALSE, threshold = 0, drop_input = FALSE)
|
x |
A dataframe with the values to be normalized. |
sample_vector |
Vector containing column names to be used. Column names should follow the same order
with the groups defined in the |
group_vector |
Vector containing goup names. Group_vector should have the same length with the
|
label |
Character tag to be added in the columns containing the mean group frequencies. Default value is "f_". |
complete_match |
Logical with default value |
threshold |
Threshold with default value = 0. By default the number of observations with frequency higher than 0 will be calculated. |
drop_input |
Select if you want to append the normalized data into the input dataframe or keep only them.
Logical with default value |
1 2 3 4 5 6 | data <- data.frame(L1 = c("a", "b", "c", "d", "e", "f", "g", "h"),
V1 = c(1, 2, 3, 6, 1, 3, 4, 4),
V2 = c(3, 4, 5, 3, 5, 5, 3, 2),
V3 = c(6, 7, 4, 2, 3, 2, 7, 6))
calc_row_frequency(x = data, sample_vector = "V", group_vector = "my_group")
calc_row_frequency(x = data, sample_vector = "V", group_vector = "my_group", threshold = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.