Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Ideas Math A Common Core Curriculum Blue

Authors: Ron Larson, Laurie Boswell

1st Edition

1608402282, 978-1608402281

More Books

Students also viewed these Mathematics questions