Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A The following R code will build and print in screen the data frame df in your R session (you can try it

image text in transcribed

Part A The following R code will build and print in screen the data frame df in your R session (you can try it if you want). The data frame will look like the one posted here. > df print(df) student Grade marks 1 John A 89 2 Alex A 82 3 Smith 75 4 Greg 63 5 Martin C 58 Using the subset () function you can extract any information you want from this data frame. Following are given some pieces of information that were extracted from this data frame using various R codes. Students have to figure out, what was the corresponding R code that produced the pieces of information posted in each of the following questions. a) Assume you want to extract the below information from the df data frame using the subset() function. student Grade 1 John 2 Alex A A marks 89 82 Put down the code you will use for it. Pay attention to what information has to be displayed and how (the format of display - it should be as above). b) Assume you want to extract the below information from the df data frame using the subset() function. 1 student John 2 Alex Put down the code you will use for it. Pay attention to what information has to be displayed and how (the format of display - it should be as above). c) Assume you want to extract the below information from the df data frame using the subset() function. student Grade marks 3 Smith B 75 4 Greg C 63 Put down the code you will use for it. Pay attention to what information has to be displayed and how (the format of display - it should be as above). Part B a) In R, create a data frame named K with columns Books (with values "r", "c", "f") and Types (with values "hardcopy", "electronic", "hardcopy". Show the code you will use for it (take a screen capture of it). b) Display its variable name and the frequency in the form of a table. Show the code you will use for it (take a screen capture of it). c) Show the output you get (take a screen capture of it). Note: r, c, f stands for romance, classic and fiction accordingly.

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_2

Step: 3

blur-text-image_3

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

Introduction to Real Analysis

Authors: Robert G. Bartle, Donald R. Sherbert

4th edition

471433314, 978-1118135853, 1118135857, 978-1118135860, 1118135865, 978-0471433316

More Books

Students also viewed these Mathematics questions