Skip to content

Start all your R code with automatically install if needed and load your required package libraries

Using pacman package in R for best practice r code script in collaboration and portability

Use pacman library as shown in the first block to install and load any list of library packages you use. you can copy and use this type of code in the beginning of all your future R scripts.

Start your block with the highlighted code to clarify this is your initial setup and no data analysis is part of this block yet

In this example, my library packages are: tidyverse, dplyr (for routine R operations) and plotly (for an interactive visualization in next steps).

Now we are done for the automatics installation of packages. Rest of code are for a simple yet elegant and handy interactive visualization.

Full guide and explanations in a complementary video tutorial here:

Leave a Reply

Your email address will not be published. Required fields are marked *