Best Practices for Coding in R

preview_player
Показать описание
Anna Skrzydło, Project Lead at Appsilon, presents best coding practices to ensure maintainable, durable code in your R projects.

Appsilon is a global leader in Shiny and has developed many large-scale Shiny projects for Fortune 500 companies. This presentation was first held at RStudio Community X-Session in August 2021. The event was a collaboration between RStudio and Appsilon.

00:20 Importance of Durable Code
01:50 Code Encapsulation
02:05 Importance of Code Encapsulation
02:35 Three Methods of Code Encapsulation
05:05 Shiny Modules
06:33 Box Package
08:20 R6 Classes
11:15 Tests!
12:15 Unit Testing With testthat
13:55 Other Tests
14:20 User Interviews
17:00 Importance of Project Structure

Presenter: Anna Skrzydło - Project Lead @ Appsilon

Appsilon open source packages for your Shiny project:

Appsilon is hiring! See all open positions here:
Рекомендации по теме
Комментарии
Автор

I am a shiny app developer and I am not a big fan of modules. Debugging with "browser()" is not really possible and the whole thing with "session$ns", etc. ist quite complicated. Nonetheless my apps are quite efficient and not really a mess, but well ordered. I put different sites on different code files in the folder "R" with Numbers of the sites beforehand ("01_first_site.R", "02_ABC.R", ...). I can warmly recommend the "Mastering Shiny" book from Hadley Wickham.

MrPhipsy
Автор

What is the advantage of using "box::use(path)" compared with using "source()"?
I think that they're doing the same work; the source() syntax looks slightly more friendly.

hoangng
Автор

Please do not use grey text on a grey background

superfreiheit