Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE SHOW ALL CODE AND USING R STUDIO ANSWER ALL PARTS THANK YOU 1. Import the data file HouseData.csv with an option stringsAsFactors = FALSE

PLEASE SHOW ALL CODE AND USING R STUDIO

ANSWER ALL PARTS THANK YOU

image text in transcribedimage text in transcribed

1. Import the data file HouseData.csv with an option stringsAsFactors = FALSE to a data frame and name it house. And then, use factor() to encode Parking and City_Category vectors as a factor. 2. Examine the structure of house, in particular, the column names. Change the order of columns so that Carpet and Builtup appear right after Observation and store it as a new data frame object named house_reordered. The order of the other columns should remain the same. 3. Add a new column named price_per_sqft to house (the original data price frame). The new column should be computed as Builtup Then display the first 15 rows and last 6 columns. Use ncol() function to represent the last 6 columns. 4. From the house data frame, use the index method only (i.e., using [ and ] ) to select the data according to the specifications below. Store the result into family_house_with_parking. The columns Observation, Dist_Taxi and Parking for houses with Parking options "Open" or "Covered" with Carpet 5. From the house data frame, use the subset() function only to select the data according to the specifications below. Store the result into my_selection. The columns Observation, Dist_Market and price for houses with Dist_Hospital less than 10,000 ft and price_per_sqft greater than or equal to 200. 1. Import the data file HouseData.csv with an option stringsAsFactors = FALSE to a data frame and name it house. And then, use factor() to encode Parking and City_Category vectors as a factor. 2. Examine the structure of house, in particular, the column names. Change the order of columns so that Carpet and Builtup appear right after Observation and store it as a new data frame object named house_reordered. The order of the other columns should remain the same. 3. Add a new column named price_per_sqft to house (the original data price frame). The new column should be computed as Builtup Then display the first 15 rows and last 6 columns. Use ncol() function to represent the last 6 columns. 4. From the house data frame, use the index method only (i.e., using [ and ] ) to select the data according to the specifications below. Store the result into family_house_with_parking. The columns Observation, Dist_Taxi and Parking for houses with Parking options "Open" or "Covered" with Carpet 5. From the house data frame, use the subset() function only to select the data according to the specifications below. Store the result into my_selection. The columns Observation, Dist_Market and price for houses with Dist_Hospital less than 10,000 ft and price_per_sqft greater than or equal to 200

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago