ACTL1101 Lecture Notes - Lecture 4: Gzip, Standard Deviation, Apache Spark

36 views3 pages
22 Oct 2018
Course
Professor

Document Summary

# create the new variable mtcars %>% mutate(kmpg=mpg/1000) %>% # group cars by how many cylinders they have summarise(avg_kmpg = mean(kmpg), # find the average kmpg for each group sd_kmpg = sd(kmpg), # find the standard deviation of kmpg for each group num_cars = n()) # find the number of cars in each group. Content type "application/x-gzip" length 5686536 bytes (5. 4 mb) downloaded 5. 4 mb. The following objects are masked from (cid:528)package:stats(cid:529): filter, lag. > mtcars %>% mutate(kmpg=mpg/1000) mpg cyl disp hp drat wt qsec vs am gear carb kmpg. + # group cars by how many cylinders they have. + # find the average kmpg for each group. + # find the standard deviation of kmpg for each group. # a tibble: 3 x 4 cyl avg_kmpg sd_kmpg num_cars. > # find the number of cars in each group.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers