what is the answer in blank space ofr the print(x) statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the answer in blank space ofr the print(x) statement?

Filtering Data Fill in the blanks to find the average "qsec" of mtcars that have "hp" greater than 100 and "gear" less than 5. x <- mtcars[mtcars $hp > 100 & mtcars$gear< 5 , 'qsec'] print( (x))

15th Oct 2022, 1:55 PM
REVATHI S
2 Answers
0
Your code is difficult to read and it is unclear where blank spaces would be. The task asks you to output the average. Please specify which task it is (lesson number).
15th Oct 2022, 3:27 PM
Lisa
Lisa - avatar
0
Use the mean() function since it is asking for an average. x <- mtcars[mtcars$hp > 100 & mtcars$gear < 5, 'qsec'] print(mean(x))
1st Nov 2022, 8:36 AM
Biyesha Jayathissa