0
Please solve this using R
You have a dataframe that includes grades of students.Your program needs to take a number as input, and output the number of students who have a grade greater than the given input. Input : input <- readLines('stdin') x <- as.integer(input[1]) data <- data.frame( "id" = c(1:10), "grade" = c(75, 26, 54, 90, 86, 93, 48, 71, 66, 99) )
3 Respostas
+ 2
Attempts?
+ 1
Read the lesson again before doing the task. Then show your attempt.
0
The following is my attempt,please suggest the changes…..
input <- readLines('stdin')
x <- as.integer(input[1])
data <- data.frame(
"id" = c(1:10),
"grade" = c(75, 26, 54, 90, 86, 93, 48, 71, 66, 99)
)
y <- length("grade" > x)
print (y)