Home > Back-end >  R: transform groupby data
R: transform groupby data

Time:04-24

I need to create a table, where rows = Houses and columns = Man, Woman and total. I've used group_by function, but it shows me the wrong data structure:

got_chars_bar <- got_chars %>% group_by(house, male) %>% count(house, sort = TRUE)

and the result is:

enter image description here

  • Related