diff --git a/episodes/02-func-R.Rmd b/episodes/02-func-R.Rmd index ae3a0f7e..62bbfd31 100644 --- a/episodes/02-func-R.Rmd +++ b/episodes/02-func-R.Rmd @@ -411,14 +411,14 @@ rescale <- function(v) { ## Functions to Create Graphs -Write a function called `analyze` that takes a filename as an argument and displays the three graphs produced in the [previous lesson][01] (average, min and max inflammation over time). -`analyze("data/inflammation-01.csv")` should produce the graphs already shown, while `analyze("data/inflammation-02.csv")` should produce corresponding graphs for the second data set. +Write a function called `plotme` that takes a filename as an argument and displays the three graphs produced in the [previous lesson][01] (mean, min and max inflammation over time). +`plotme("data/inflammation-01.csv")` should produce the graphs already shown, while `plotme("data/inflammation-02.csv")` should produce corresponding graphs for the second data set. Be sure to document your function with comments. ::::::::::::::: solution ```r -analyze <- function(filename) { +plotme <- function(filename) { # Plots the average, min, and max inflammation over time. # Input is character string of a csv file. dat <- read.csv(file = filename, header = FALSE)