Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. A 00 : Use the read, csv() function to read in the Wine. csv fite. Nase it wine and don't forget to use the

image text in transcribed
image text in transcribed
1. A 00 : Use the read, csv() function to read in the Wine. csv fite. Nase it wine and don't forget to use the stringsit argunent. zwtrz Note that the Code Grade virtual machine (conputer) already has the Wine.csv file in its working, directory. 3. atrzen When submitting to code grade, use a read.csv() statement that assumes the file is already in the working directory. 4 anzage Do not subnit code with setwdi) or that has a path (for example: Users/first, last/oesktop) in it. 5 vine \& read, csv("Wine.csv", strings=t) 6 f 01 a F How many observations (rows) are available to you? Use the nrow() function. 7 nrow (2BB902) 8 \& 916 * How teany variables (cotumns) are collected on each rated wine? Use the ncol() function. 9 ncol (13) 10 zrmukaz It is ipportant to find the exact spellings of colunn nanes and entries within columns in the wine datafrane. 11 * 02a * Use the nanes() or str(l) function on the wine datafrane to view the exact spelings of the colunn nanes. 12 nanes (Wine) 13 : 02b * Use the sumary(l) function on the taster twitter handle cotum to view the exact speltings of the tasters' twitter handles. 14. errrerr You will use this strategy of "looking" in a column to get exact sepllings to answer questions on this quiz. is: 16 *marart It is ingortant to know whether there are missing values (NAS) in your data 17 mamera since Nas need to be addressed for certain functions to work correctly. 18=03s= Use the sua(l) and is.na() functions to find the nunber of nissing values in the wine datafrane. 20 * 036= Use the sun() and isina() functions to count the number of missing vatues in the points columen. 22 a 03c= Use the sum(l) and is. na() functions to count the number of nissing vatues in the price column. 24=03d+ Use the sun(i) and 1s. naf) functions to count the number of observations that have a arice. 25. stereat Minti 5ince the I means "not", putting on t in tront of is, na() counts the non-aissing vatues. 27 o oua o use the mean(l) function to catculate the average points for the wines in the dataset. 29. 04b o use the eeant) function to catculate the average price for the wines in the dataset. 31 - 050 : Vae the aveant) function to cateulate the average points for the Napa Sonoms sub-region. 32 semer Yoar code thoutd be a single tine and witl use the square brackets for sutsetting.. 34 . OSt - use the neanif function to colcutate the average price for the Napa sonona sub-regionusing a singte line of code. 36=00 F Now we'th practice our counting skutts again. 3r erime the rating scato beima used by these tasters orignatly had 91 as the highest possible scare. 24 \# 03d * use the sum(l) and is.na(l) functions to count the number of observations that have a price. Frreffn Hint: Since the 1 means "not", putting an 1 in front of is.na() counts the non-missing values. 2 04a \# Use the mean() function to calculate the average points for the wines in the dataset. \# 046 * Use the mean() function to calculate the average price for the wines in the dataset. * Q5a \& Use the mean() function to calculate the average points for the Napa Sonoma sub-region. 32 annathe Your code should be a single line and witl use the square brackets for subsetting.. " 05b o Use the nean() function to calculate the average price for the Napa Sonona sub-regionusing a single tine of code. \& ob a Now we'tl practice our counting skitls again. HAankn The rating scale being used by these tasters orignally had 91 as the highest possible score. astare and now goes to 100 for exceedingly delicious wines. masey use the sun() function on a togical vector that checks for whether points are greater than 91 or not intan to count the number of wine ratings with nore than 91 points. 42 : 07a a Now we'tl practice subsetting on more than one criteria. 43 ancaese Use the mean() function to conpute the average points for wines 44 asmant that are chardonnay and tron the Napa Sonoma sub-region. 45 * 076 a Mare practice subsetting on more than one criteria. 47 anatan Use the mean() function to conpute the ayerage price for wines that are 48 masman esther chardonnay or are tron the finger lakes sub-region. 50:08= use the median(i function to find the median price for 51 ansata a Cabernet Sauvignon that is rated higher than 91 points

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago