A quick clip to see the power of tbl_summary in action kzbin.infoUgkxdzJBFDR4FKAmq10tkbkBaBoAPnOdd4OH?si=KcUXQqTbwrx-qzhP
@dannie4356 Жыл бұрын
for the most parts which worked, thank you! but the labelled function... tried checking everything already but i had to change the csv in order to change the variable labels... Also the outcome plot which i exported have a side bar in it? that is so weird!
@DataAnalytic Жыл бұрын
Hello Just retested the code and it worked fine. I suspect that you might have missed the dot in front of the labels, it should be .labels labelled::set_variable_labels(.labels = c("Cut of diamond" , "Diamond colour")) Cant't think of any other issue. Try cutting and pasting the code in a new script and it should work library(labelled) library(ggplot2) library(dplyr) library(gtsummary) df % dplyr::select(cut, color)%>% labelled::set_variable_labels(.labels = c("Cut of diamond" , "Diamond colour")) %>% tbl_cross(row = cut , col = color , percent = "row" , missing ="no" , missing_text = "Missing Values" )%>% add_p(source_note = TRUE)%>% bold_labels()%>% bold_levels() About the side bar which you mentioned. Was it with the first table or the second ( which used the flextable conversion)
@marufadnanchowdhury14707 ай бұрын
@@DataAnalytic thanks for the code that helped
@MizanurShuvraRidwan6 ай бұрын
i tried running the gtsummary package and it shows errors because my variables are factors. So, I guess y9ou need to mention what type of variables work for the gtsummary cross tabs