scripts/make_sumtable.R

make_sumtable <- function(data,
                          selected_products,
                          selectedAttributes){
  res <- data %>%
    dplyr::filter(Product_Name %in% unlist(unique(selected_products)),
           Attribute_Name %in% unlist(unique(selectedAttributes))) %>%
    dplyr::group_by(Study, Product_Name, Attribute_Name) %>%
    dplyr::summarize(Mean_scores = round(mean(Attribute_Value), 2)) %>%
    dplyr::ungroup()
}
aigorahub/aigoraRPDashboard documentation built on May 30, 2022, 8:46 p.m.