Learn R

The posts here will assist you to prepare R Markdown files easily. Not only the R Markdown Basics, the other knowledge related to learn R quickly are also given.

Teaching and Learning R using flipbookr package

One of the heart touching R packages that I noted in rstudio::global(2021), 24-hour virtual conference was flipbookr package developed by Gina Reynolds, Garrick Aden-Buie and Emi Tanaka. Using flipbookr package you can present your code step-by-step and side-by-side with its output. This incremental code-output evolution is really helpful to learn how the output changes step-by-step when adding R codes one by one. How do we create a flipbook? First install the package from GitHub.

Writing books using bookdown package

Writing a book is now an amazing experience using R open source software. The R package, bookdown, developed by Yihui Xie, generates printer-ready books and ebooks from R Markdown documents. This package produces books in all output forms (PDF, HTML, ePub, LaTeX, Word and Kindle books etc.). We can also add dynamic graphics and interactive applications (HTML widgets and Shiny apps) to books, and further the package supports a wide range of languages (R, C/C++, Python, Fortran, Julia, Shell scripts, and SQL, etc).

Creating dashboards using "flexdashboard" R package

Creating a dashboard is an attractive way to visualize different groups of related data. To setup a dashboard we can use the R package flexdashboard. First, setup the orientation of the dashboard in YML header. The default orientation is columns, which shows individual charts stacked vertically within each column. To setup the orientation row-wise specify orientation: rows option in YML header. Similarly, we can display several components in different windows using a tabset.
Jupyter Notebook

Jupyter Notebook

R or Jupyter Notebook? Although I am a fan of R, RStudio and R Notebook, some researchers are familiar with Jupyter Notebook. Specially, those who work in industry may love to use Jupyter Notebook. Jupyter Notebook is a web application in which you can create and share documents that contain live codes, equations, text and also graphical visualizations. Therefore, we can use Jupyter Notebook to perform data analysis in real time.

Intial steps for your Data Analysis

Before using R for the Data Analysis, you should know some key points to avoid getting many error messages. In this post, I will explain some of those key points. Preparing Data for the Analysis Variable names Since R is a Case Sensitive Language, variables ‘Age’ and ‘age’ will be treated as different variables in R. Therefore, you should select a common form to name all your variables. I usually use all simple for the variable names.

Learn R Markdown Basics

We can have R codes, results and interpretation of results in one document by using R Notebook for the data analysis. R Notebook is an R Markdown document that can be executed independently and interactively, and it interacts with R directly while producing a reproducible document with publication-quality output.Therefore, at least a basic knowledge in R Markdown is needed to use R Markdown and R Notebook. Some basic concepts required are given below, and you can learn more by using the lessons given in RStudio website https://rmarkdown.
Creating a website using Rblogdown

Creating a website using Rblogdown

I have used R blogdown package to setup this static website. Thanks to Yihui Xie, Amber Thomas, and Alison Presmanes Hill for their hard work. First, I have started reading their E book to understand the basics. Then, I have setup a simple website by using the default theme (hugo-lithium) as suggested by the authors. Next, I have changed the theme to hugo-academic. However, for this website I have used the Mainroad theme.