- 1

This is my code for the grade analysis question

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) ) print(length(data,grade>x))

17th Jul 2022, 9:20 AM
Thandolwenkosi
3 Answers
+ 4
Don't make another thread, you can add in same question https://www.sololearn.com/Discuss/3061415/?ref=app
17th Jul 2022, 9:23 AM
A͢J
A͢J - avatar
+ 2
Thandolwenkosi y = data[data$grade > x, ] print(length(y$grade))
17th Jul 2022, 9:25 AM
A͢J
A͢J - avatar
+ 1
Thank you
17th Jul 2022, 9:30 AM
Thandolwenkosi