Using the csv file, write an R script that contains the following R functions: r
ID: 3671606 • Letter: U
Question
Using the csv file, write an R script that contains the following R functions:
readData <- function(fileName);
This function reads data from a csv file called fileName. A data frame that stores the contents of this file is returned.
checkStudent <- function(df, studentName);
This function extracts a particular student's grades data from a data frame and returns them.
checkAssessment <- function(df, assessmentName);
This function returns a vector/list of three statistics, min, max, and average, about the assessment whose name is given as assessmentName.
Explanation / Answer
1) Function to read a file and return the dataframe:
readData <- function(fileName){
mydata <- read.csv(fileName, header=FALSE)
return mydata
}
2)
checkStudent <- function(df, studentName){
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.