get_perct.Rd
This function calculates the percentage of a value within a column, excluding NA values. It returns the count of the specific value, the total count of non-NA values, and the percentage of the specific value out of all the non-NA values.
get_perct(x, value)
A string that provides the count of the specific value, the total count of non-NA values, and the percentage of the specific value in the format of "count/total (percentage)".
get_perct(bns2_pkg_data$q14_9, "Yes")
#> [1] "10/44 (22.7%)"