From 919e1362a67feccb204e06a8bbd5911d4552bc6f Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Thu, 13 Nov 2025 17:56:25 +0300 Subject: [PATCH] Clearer function name --- episodes/02-func-R.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)