I\'m working through an R tutorial. I\'ve been working on a function and one of the parts of the function is to take an argument and use it to define a directory in which to
getmonitor <- function(id, directory=getwd(), ...){ csvfile <- sprintf("%03d.csv", id) filepath <- file.path(directory, csvfile) foo <- read.csv(filepath, ...) foo }