HIA 226 Assignment 05 Read the following instructions carefully 1. The full mark of this test is 5 points, contributing to 8% of the final grade. 2. Submit the assignment to our digital learning...

1 answer below »
HIA 226 Assignment 05 Read the following instructions carefully 1. The full mark of this test is 5 points, contributing to 8% of the final grade. 2. Submit the assignment to our digital learning platform 2.5 hours before the next synchronous session. 3. All submitted work must be typeset, saved in either Microsoft .docx or Adobe .pdf format. 4. In the assignment, number all questions, sections, and subsections clearly. 5. Use a page break a new page for each question. In Microsoft Word, you can press Ctrl + Enter to add a page break. 6. Save the file as “First Last Assignment##”. For example, “Ken Chui Assignment01.docx”. 7. Unless being told otherwise, ˆ report all up to three significant figures, round up. E.g. Report 12.358 as “12.4” and 0.0025477 as “0.00255”. Scientific notation is also allowed: 2.55 × 10-3 . ˆ show your mathematical works, if applicable. ˆ show your R syntax codes in monospace font type (e.g. Courier New), if applicable. 8. You are allowed to work in groups to discuss how to approach the questions, but the answer should be written individually. Do not share typed or written answers. 9. You are also encourage to post questions on Piazza.com. Remember to tag the question with the “assignment” tag. HIA 226: Data Wrangling HIA 226 Assignment 05 Page 2 of 2 R competency The “R competency” questions cover some of what we covered in the video lectures. You may use this as a test of your comprehension. 1. In this question we will use a built-in data set called “mtcars” (you might remember this in our synchronous session.) You can simply use mtcars in R-Studio to refer to it. Or you can use an assignment like mtcarscopy <- mtcars to save it as a data set for you to work on. and do not worry about destroying the built-in data, they cannot be easily overwritten. to learn more about this data set, use the ? mtcars command. for this question, just paste your r sql code. (a) [11/2 points] using sql, from the full data, create a table that only shows the variables mpg, wt, cyl, and hp. (b) [11/2 points] using sql, from the full data, create a table that shows only cases with mpg bigger or equal 20. (c) [2 points] using sql, from the full data, create a table that combines the selection criteria of the above two questions. order the table in ascending order of wt. end of the assignment remember to name this file correctly and submit it through the learning digital platform. hia 226: data wrangling mtcars="" to="" save="" it="" as="" a="" data="" set="" for="" you="" to="" work="" on.="" and="" do="" not="" worry="" about="" destroying="" the="" built-in="" data,="" they="" cannot="" be="" easily="" overwritten.="" to="" learn="" more="" about="" this="" data="" set,="" use="" the="" mtcars="" command.="" for="" this="" question,="" just="" paste="" your="" r="" sql="" code.="" (a)="" [11/2="" points]="" using="" sql,="" from="" the="" full="" data,="" create="" a="" table="" that="" only="" shows="" the="" variables="" mpg,="" wt,="" cyl,="" and="" hp.="" (b)="" [11/2="" points]="" using="" sql,="" from="" the="" full="" data,="" create="" a="" table="" that="" shows="" only="" cases="" with="" mpg="" bigger="" or="" equal="" 20.="" (c)="" [2="" points]="" using="" sql,="" from="" the="" full="" data,="" create="" a="" table="" that="" combines="" the="" selection="" criteria="" of="" the="" above="" two="" questions.="" order="" the="" table="" in="" ascending="" order="" of="" wt.="" end="" of="" the="" assignment="" remember="" to="" name="" this="" file="" correctly="" and="" submit="" it="" through="" the="" learning="" digital="" platform.="" hia="" 226:="" data="">
Answered Same DayOct 27, 2021

Answer To: HIA 226 Assignment 05 Read the following instructions carefully 1. The full mark of this test is 5...

Mohd answered on Oct 27 2021
114 Votes
Assignment 05
Assignment 05
-
10/27/2021
library(DBI)
## Warning: package 'DBI' was built under
R version 4.1.1
library(RSQLite)
## Warning: package 'RSQLite' was built under R version 4.1.1
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.3 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.0.0 v forcats 0.5.1
## Warning: package 'tidyr' was built under R version 4.1.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
Using SQL, from the full data, create a table that only shows the variables mpg, wt, cyl, and hp.
mtcars_subset<-mtcars%>%
select(mpg,wt,cyl,hp)
mtcars_subset %>% head()
## mpg wt cyl hp
## Mazda RX4 21.0 2.620 ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here