12.5 C
London
Saturday, July 6, 2024
HomeRVisualizations in R

Visualizations in R

How to Create a Correlation Heatmap in R (With Example)

You can use the following basic syntax to create a correlation heatmap in R: #calculate correlation between each pairwise combination of variables cor_df #melt the data...

How to Perform Linear Regression with Categorical Variables in R

Linear regression is a method we can use to quantify the relationship between one or more predictor variables and a response variable. Often you may...

How to Plot a Subset of a Data Frame in R

You can use the following methods to plot a subset of a data frame in R: Method 1: Plot Subset of Data Frame Based on...

How to Draw Boxplots with Mean Values in R (With Examples)

You can use the following methods to draw a boxplot with a mean value in R: Method 1: Use Base R #create boxplots boxplot(df$values~df$group) #calculate mean value by...

How to Change Legend Size in Base R Plot (With Examples)

The easiest way to change the size of a legend in a base R plot is to use the cex argument: legend('topright', legend=c('A', 'B'), col=1:2,...

How to Use Bold Font in R (With Examples)

You can use the following basic syntax to produce bold font in R plots: substitute(paste(bold('this text is bold'))) The following examples show how to use this...

How to Create a Scatterplot Matrix in R (2 Examples)

A scatterplot matrix is a matrix of scatterplots that lets you understand the pairwise relationship between different variables in a dataset. There are two common...

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Must read