From e421b0cbbf7de77423dfa974ac047d7150dff094 Mon Sep 17 00:00:00 2001 From: meaganluck Date: Fri, 19 Nov 2021 09:17:49 -0500 Subject: [PATCH] turn in code for Exercise09 --- Exercise09code.R | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Exercise09code.R diff --git a/Exercise09code.R b/Exercise09code.R new file mode 100644 index 0000000..e471f4f --- /dev/null +++ b/Exercise09code.R @@ -0,0 +1,33 @@ +# Usage: (directory_path, specified_column) +coeffOfVar <- function(dir,colName){ + fileList <- list.files(path = dir) + vectorOutput <- c() + for(i in fileList){ + data <- read.table(i,header=TRUE,sep=",",stringsAsFactors=FALSE) + rows <- length(data$colName) + minRow <- 50 + if(rows