79162438

Date: 2024-11-06 11:46:14
Score: 0.5
Natty:
Report link

Here is R equivalent of your SAS code:

library(dplyr)

df |> 
  select(ID,GENDER,BIRTHYEAR) |> 
  group_by(ID) |> 
  summarize(count = n())

Where df is your dataframe. select, group_by and summarize are all dplyr verbs.

You can learn more about the R dplyr package here: https://dplyr.tidyverse.org/

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ifeanyi Idiaye