Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program is to be run in R please help me with question number 3 part D 3. Using the built-in matrix state.x77, create/process the

This program is to be run in R please help me with question number 3 part D

3. Using the built-in matrix state.x77, create/process the following vectors/dataframes:

a. df3a as a data frame create from state.x77

d. df3b as a data frame whose data is identical to df3a; however, change the row names such that even numbered rows have the number for row name and d numbered rows retain the original row name i.e. Alabama, 2, Arizona, 4 so on.

image text in transcribed

compose the R script after carefully reading all the following instructions. The submitted scripts wil be graded using a grader script, so it is important the R script being submitted adheres to the instructions/requirements (names of variables used, names of functions used, case of the names etc.) stated in each of the tasks/questions. Please make sure that the script being submitted runs to completion without throwing any errors. Scripts that throw errors may receive a penalty of up to 50%. Create a variable named ewid and assign your CWID as its value. 2) Using the built-in mtcars data frame, create process the following vectors/datafrarnes: a. b. c. df2a with all rows and even numbered columns from mtcars df2b with odd numbered rows and all columns from mtcars df2c with every 4th row (1, 5, 9 ...) and every 3rd column (1, 4, 7 ...) from mtcars dE2d with all rows and all columns from mtcars with rows appearing in reserve order as compared to mtcars df2e with all rows and all columns from mtcars with columns appearing in reserve order as compared to mtcars d. e. Hint: See help on nrow; ncol. Using the built-in matrix state. x77, create/process the following vectors/dataframes: a. df3a as a data frame create from state.x77 b. vecColNames as a vector containing the column names from df3a c. vcRowNames as a vector containing the row names from df3a d. 3. dE3b as a data frame whose data is identical to de3a; however, change the row names such that even numbered rows have the number for row name and d numbered rows retain the original row name i.e. "Alabama", "2", "Arizona", "4" so on. Hint: See help on as.data.frame; rownames; colnames. Using the built-in matrix iris, create/process the following vectors/dataframes: a. 4. dfsa identical to iris; however, set Sepal.Length to 6.0 wherever the original (iris) values are greater than 5.5 and less than or equal to 6.7

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 Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

How could assessment be used in an employee development program?

Answered: 1 week ago