Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, September 5, 2019

Codecademy Mean in R 3/4


#Sample Solution
---
title: "Mean in R"
output: html_notebook
---
```{r message=FALSE, warning=FALSE}
# import libraries
library(readr)
library(dplyr)
# Read author data
greatest_books = read_csv("top-hundred-books.csv")

# Set author ages to a vector
author_ages <- greatest_books$Ages

# Use R to calculate mean
average_age <- mean(author_ages)
print(average_age)
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts