Hi,
I am trying to create a function for value counts with groupby
method in R, i get an error if i call the function
This is the function:
valueCounts <- function (c) {
df |> select(c) |>
groupby(c) |> summarise(col_1 = n())
}
valueCounts('column1')
I get an error, what do I understand groupby function cannot take string key column. Please advise