given there is no variable called i_record in data frame tx_policies.
Since you are using injury_month = month(injury_date, label = TRUE, abbr = TRUE) to derive the abbreviation of months. It's better to put Sys.setlocale("LC_ALL","English") in your setup chunk. Otherwise, the knitting system will crash whenever the default language of R is not in English. RStudio has a serious issue of picking up the default language of R. Even though you modify the base R configuration, RStudio will still choose to use the default language of your OS as the language of R. It will be a safer practice to ensure your code will still be valid no matter what language of the user's OS is.
The citation style is not in APA 6th. You could include the csl file to ensure it is in APA style.
It's better to provide variables description as a table in your data description section.
For Figure 3.1, my suggestion is to facet your plot by gender and plot count against age rather than using a stacked bar plot which is pretty hard to tell the age distribution in female.
For Table 3.1, you refer to it as 'age group', but it actually is a comparison between discrete ages. If you want to compare it by age groups, you need to group it like "10-15", "15-20" and "20-25" etc. Besides, I don't recommend you to sort it by the percentage because it will potentially break the relationship between age and percentage. People get used to the ascending order of age.
For Table 3.2. you need to spread the Gender into 2 columns. Try to take the advantages of the two-way table. Other than that, group your ages as mentioned in 6.
If I am not mistaken, the primary question needs to be a generalized version of your secondary questions instead of a standalone question. In other words, you want to answer your secondary questions in order to answer your primary question. However, I don't see a strong relationship between your primary question and your secondary questions.
For Table 3.3, you need to at least maintain the order of time in column Season. In addition, your table will look better if you can transpose it.
Overall, you did a great job in analyzing the amusement park injuries. I love the part you break it down by agent to address some real issues of amusement park injury prevention.
Hi, team bilby,
index.Rmd
. In particular, at line 152needs to be modified to
given there is no variable called
i_record
in data frametx_policies
.Since you are using
injury_month = month(injury_date, label = TRUE, abbr = TRUE)
to derive the abbreviation of months. It's better to putSys.setlocale("LC_ALL","English")
in your setup chunk. Otherwise, the knitting system will crash whenever the default language of R is not in English. RStudio has a serious issue of picking up the default language of R. Even though you modify the base R configuration, RStudio will still choose to use the default language of your OS as the language of R. It will be a safer practice to ensure your code will still be valid no matter what language of the user's OS is.The citation style is not in APA 6th. You could include the csl file to ensure it is in APA style.
It's better to provide variables description as a table in your data description section.
For Figure 3.1, my suggestion is to facet your plot by gender and plot count against age rather than using a stacked bar plot which is pretty hard to tell the age distribution in female.
For Table 3.1, you refer to it as 'age group', but it actually is a comparison between discrete ages. If you want to compare it by age groups, you need to group it like "10-15", "15-20" and "20-25" etc. Besides, I don't recommend you to sort it by the percentage because it will potentially break the relationship between age and percentage. People get used to the ascending order of age.
For Table 3.2. you need to spread the
Gender
into 2 columns. Try to take the advantages of the two-way table. Other than that, group your ages as mentioned in 6.If I am not mistaken, the primary question needs to be a generalized version of your secondary questions instead of a standalone question. In other words, you want to answer your secondary questions in order to answer your primary question. However, I don't see a strong relationship between your primary question and your secondary questions.
For Table 3.3, you need to at least maintain the order of time in column
Season
. In addition, your table will look better if you can transpose it.Overall, you did a great job in analyzing the amusement park injuries. I love the part you break it down by agent to address some real issues of amusement park injury prevention.
cheers, Weihao