Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the creature.data data frame for this exercise. Write R Code to extract the waking hours for all creatures using two different R commands. creatures
Use the creature.data data frame for this exercise. Write R Code to extract the waking hours for all creatures using two different R commands.
creatures = c("dog","cat","armadillo","human")
friendly = c(TRUE, TRUE, FALSE, TRUE)
diet = c("anything","mice","termites","pizza")
waking.hours = c(13.9, 11.5, 5.9, 16.0)
creature.data = data.frame(friendly, diet, waking.hours, row.names=creatures)
creatures[creature.data$waking.hours < 12 & !creature.data$friendly]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started