#Sample Solution
---
title: "Mode in R"
output: html_notebook
---
```{r message=FALSE, warning=FALSE}
# import libraries
library(readr)
library(dplyr)
library(DescTools)
# Read author data
greatest_books = read_csv("top-hundred-books.csv")
# Set author ages to
author_ages <- greatest_books$Ages
mode_age <- Mode(author_ages)
print(paste("The mode age of authors from Le Monde's 100 greatest books is: ", mode_age[1]))
```
No comments:
Post a Comment