# Articles by R on Stats and R

### Descriptive statistics in R

January 21, 2020 |

Introduction Data Minimum and maximum Range Mean Median First and third quartile Other quantiles Interquartile range Standard deviation and variance Summary Coefficient of variation Mode Contingency table Barplot Histogram Boxplot Scatterplot QQ-plot For a single variable By groups Density plot Introduction This article explains how to compute the main descriptive ...

### Tips and tricks in RStudio and R Markdown

January 20, 2020 |

Run code Insert a comment in R and R Markdown Knit a R Markdown document Code snippets Ordered list in R Markdown New code chunk in R Markdown Reformat code RStudio addins {pander} for aesthetics Extract equation model with {equatiomatic} Pipe oper...

### Tips and tricks in RStudio and R Markdown

January 20, 2020 |

Run code Insert a comment in R and R Markdown Knit a R Markdown document Code snippets Ordered list in R Markdown New code chunk in R Markdown Reformat code Others If you have the chance to work with an experienced programmer, you may be amazed ...

### A Shiny app for simple linear regression by hand and in R

January 14, 2020 |

Simple linear regression is a statistical method to summarize and study relationships between two variables. When more than two variables are of interest, it is referred as multiple linear regression. In this article, we focus only on a Shiny app wh... [Read more...]

### A Shiny app for simple linear regression by hand and in R

January 14, 2020 |

A Shiny app to perform simple linear regression (by hand and in R) Simple linear regression is a statistical method to summarize and study relationships between two variables. When more than two variables are of interest, it is referred as multip...

### World map of visited countries in R

January 8, 2020 |

Like me, if you like traveling as much as R you might want to draw a world map of the countries you have visited in R. Below an example with the countries I have visited as of January 2020: To draw this map in R, you will need the following packages: {{... [Read more...]

### World map of visited countries in R

January 8, 2020 |

Like me, if you like traveling as much as R you might want to draw a world map of the countries you have visited in R. Below an example with the countries I have visited as of January 2020: To draw this map in R, you will need the following packages: {{... [Read more...]

### Data types in R

December 29, 2019 |

What data types exist in R? Numeric Integer Character Factor Logical This article presents the different data types in R. To learn about the different variable types from a statistical point of view, read “Variable types and examples”. What da...

### Data types in R

December 29, 2019 |

What data types exist in R? Numeric Integer Character Logical This article presents the different data types in R. To learn about the different variable types from a statistical point of view, read “Variable types and examples”. What data types exist in R? There are five data types in R: ... [Read more...]

### How to create an interactive booklist with automatic Amazon affiliate links in R

December 25, 2019 |

Introduction Requirements Create a booklist Create it in Excel then import it Create it directly in R Make it interactive Add URLs with your affiliate link to the table Extract affiliate link Append the book title and author to make it automatic Add links to the interactive table Final result ...

### How to create an interactive booklist with automatic Amazon affiliate links in R?

December 25, 2019 |

Introduction Requirements Create a booklist Create it in Excel then import it Create it directly in R Make it interactive Add URLs with your affiliate link to the table Extract affiliate link Append the book title and author to make it automatic Add links to the interactive table Final result ...

### Data manipulation in R

December 23, 2019 |

Introduction Dataset Subset a dataset First or last observations Random sample of observations Based on row or column numbers Based on variable names Based on one or multiple criterion Create a new variable Transform a continuous variable into a c...

### Data manipulation in R

December 23, 2019 |

Introduction Dataset Subset a dataset First or last observations Random sample of observations Based on row or column numbers Based on variable names Based on one or multiple criterion Create a new variable Discretize a continuous variable Categorical variables and labels management Recode categorical variables Change reference level Rename variable ... [Read more...]

### How to import an Excel file in RStudio

December 17, 2019 |

Introduction Transform an Excel file to a CSV file R working directory Get working directory Set working directory User-friendly method Via the console Via the text editor Import your dataset User-friendly way Via the text editor Import SPSS (.sav) files Introduction As we have seen in this article on how ...

### How to import an Excel file in RStudio?

December 17, 2019 |

Introduction Transform an Excel file to a CSV file R working directory Get working directory Set working directory User-friendly method Via the console Via the text editor Import your dataset User-friendly way Via the text editor Import SPSS (.s...

### How to install R and RStudio?

December 16, 2019 |

What is R and RStudio? R RStudio The main components of RStudio Examples of code Calculator Comments Store and print values Vectors Matrices Generate random values Plot What is R and RStudio? R R is nothing more than a programming language. At the time of writing, this language is (one ...