Skip to content

JeMaNd-r/Implement_good_coding_practice_in_R

Repository files navigation

## Implement good coding practices 

Date of creation: 2022-11-30

This folder contains an exercise (incl. solution) to implement good coding practices into a researcher's daily life. 

Exercise: Improve the Script_raw.R file by applying good coding practices and the checklist on page 31 in the PDF document.


## Contact information

Romy Zeiss
[email protected]


## Updates

Updates will be available here: 
https://github.com/JeMaNd-r/Implement_good_coding_practice_in_R


## Files

2022-11-08_Principles-of-software-development_Daniel-Vedder.pdf
Manuscript created by Daniel Vedder about good practices for software development.

Script_improved.R
R code with simple analysis following good coding practices.

Script_raw.R
R code with simple analysis not following good coding practices.


## Session information

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] forcats_0.5.1   stringr_1.4.1   dplyr_1.0.7     purrr_0.3.4     readr_2.1.0     tidyr_1.1.4    
[7] tibble_3.1.6    ggplot2_3.3.5   tidyverse_1.3.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7       cellranger_1.1.0 pillar_1.6.4     compiler_4.0.3   dbplyr_2.1.1     tools_4.0.3     
 [7] digest_0.6.28    lattice_0.20-41  nlme_3.1-149     jsonlite_1.7.2   lubridate_1.8.0  lifecycle_1.0.1 
[13] gtable_0.3.1     mgcv_1.8-33      pkgconfig_2.0.3  rlang_0.4.12     Matrix_1.5-1     reprex_2.0.1    
[19] cli_3.1.0        rstudioapi_0.13  DBI_1.1.1        haven_2.4.3      xml2_1.3.3       withr_2.5.0     
[25] httr_1.4.4       fs_1.5.0         generics_0.1.3   vctrs_0.3.8      hms_1.1.1        grid_4.0.3      
[31] tidyselect_1.1.1 glue_1.5.0       R6_2.5.1         fansi_0.5.0      readxl_1.3.1     farver_2.1.0    
[37] tzdb_0.2.0       modelr_0.1.8     magrittr_2.0.1   splines_4.0.3    backports_1.3.0  scales_1.1.1    
[43] ellipsis_0.3.2   rvest_1.0.2      assertthat_0.2.1 colorspace_2.0-2 labeling_0.4.2   utf8_1.2.2      
[49] stringi_1.5.3    munsell_0.5.0    broom_0.7.10     crayon_1.5.2

About

Exercise to apply good coding practice on bad, examplary R code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages