You can save a line of code with tidyr::unite(). Also, I've been trying to wrap my head around the new tidyr functions pivot_longer() and pivot_wider() for specifying more complex data reshaping in a single line of code, so I've included an example of that approach below as well.
# Need development version of tidyr for pivot_wider()
# devtools::install_github(tidyverse/tidyr)
library(tidyverse)
df <- data.frame(Sex = c("M","F","M","M","F","F"),
RSVP = c("Y","N","N","Y","N","Y"),stringsAsFactors = FALSE)
# Using unite() with @nwerth's answer
df %>%
count(Sex, RSVP) %>%
group_by(Sex) %>%
mutate(prop = prop.table(n)) %>%
gather(measure, value, n, prop) %>%
unite(measure, measure, RSVP) %>%
spread(measure, value)
#> # A tibble: 2 x 5
#> # Groups: Sex [2]
#> Sex n_N n_Y prop_N prop_Y
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 F 2 1 0.667 0.333
#> 2 M 1 2 0.333 0.667
# Using pivot_wider()
df %>%
count(Sex, RSVP) %>%
group_by(Sex) %>%
mutate(prop = prop.table(n)) %>%
pivot_wider(names_from=RSVP, values_from=c(n, prop))
#> # A tibble: 2 x 5
#> Sex n_N n_Y prop_N prop_Y
#> <chr> <int> <int> <dbl> <dbl>
#> 1 F 2 1 0.667 0.333
#> 2 M 1 2 0.333 0.667