INTRODUCTION The package DT offers an R “window” to JavaScript DataTables. R uses data in matrices’ or data frames’ form; with DT, they can be displayed as tables on HTML pages. The important thing is that filtering, pagination, sorting, etc. are used to transform it into a really useful tool. Before proceeding, please follow our […]

# Exercises (beginner)

## Lattice Exercises

INTRODUCTION The lattice package is a special visualization package, as it takes base R graphics one step further by providing improved default graphs and the ability to display multivariate relationships. It attempts to improve base R graphics by providing better defaults and the ability to easily display multivariate relationships. Before proceeding, please follow our short […]

## Survival Analysis using GGPlot Exercises (Part 1)

Clinical trials can be planned to the very last detail, but that doesn’t prevent people from losing touch with the study, moving abroad, or never experiencing the expected event. That event could be the curing of a disease, platelet counts falling below a certain threshold, or, in undesirable circumstances, death. In all cases where the […]

## Mathematical Expressions in R Plots: Exercises

It is common to find yourself needing to use specific symbols or mathematical notation on R graphics. For example you may want to display R^2 values, but you also want the R^2 to be rendered nicely. R has a rich set of options for including this mathematical text on plots. We previously discussed this in […]

## Graph Theory: Using iGraph Exercises (Part-1)

This is part 1 of a series in analyzing and visualizing network data using iGraph. The rest of the series can be found here. Graph Theory, or network analysis as it is often called, is the mathematical portrayal of a series of edges and vertices. To contextually picture a network, think of each node being […]

## Dplyr Basic Functions – Exercises

INTRODUCTION The dplyr is an R-package that is used for transformation and summarization of tabular data with rows and columns. It includes a set of functions that filter rows, select specific columns, re-order rows, adds new columns and summarizes data. Moreover, dplyr contains a useful function to perform another common task, which is the “split-apply-combine” […]

## Regression Model Assumptions Exercises

You might fit a statistical model to a set of data and obtain parameter estimates. However, you are not done at this point. You need to make sure the assumptions of the particular model you used were met. One tool is to examine the model residuals. We previously discussed this in a tutorial. The residuals […]

## Plotly basic charts – exercises

INTRODUCTION Plotly’s R graphing library makes interactive, publication-quality web graphs. More specifically it gives us the ability to make line plots, scatter plots, area charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, multiple-axes, and 3D charts. In this tutorial we are going to make a first step in plotly’s world by learning to […]

## dplyr basics: More smooth data exploration

Anywhere you look at R code these days, dplyr seems to be there – indeed data indicate that its popularity is growing relative to many common R packages. Influential data scientists have recommended that beginners start “from scratch with the dplyr package for manipulating a data frame” leaving for later standard R subsetting and loops. […]

## Generalized linear functions (Beginners)

On this set of exercises, we are going to use the lm and glm functions to perform several generalized linear models on one dataset. Since this is a basic set of exercises we will take a closer look at the arguments of these functions and how to take advantage of the output of each function […]