I have a two part question
I am attempting to create a table in R with the Median length of stay in the hospital (and the IQR) by age group per month. I attempted the following code, but got a "error: object ‘AgeGroup’ not found. I checked my dataset by using “names” and this variable does exist. Is my code incorrect?
```
tbl_summary_ex3 ←
hospclnmatch27dec2023 %>%
select(LOS, yearmonth, AgeGroup) %>%
tbl_summary(by = yearmonth, AgeGroup,
statistic = LOS ~ “{median} ({p25} - {p75})”)
I am also attempting to create a graph in R that will display Median length of stay in the hospital by age group per month. (y axis would be LOS and x axis would be months ) I don't know how to execute this in ggplot. What is an example of code I would use?
![image|690x333](upload://fjbGZkmn460LEzVMyF25PD5FjKl.png)