Question: 1 . From ISLR obtain the Caravan data. Please answer the following questions based on this dataset. Here is what the dataset is: table
From ISLR obtain the Caravan data. Please answer the following questions based on this dataset. Here is what the dataset is:
tableABCDName,Age,Weight,HeightABCDETKU
a Name Caravan data as temp
b Find the dimension of Caravan data.
c Find column names of Caravan data.
d Find the rows of the Caravan where the Purchase column shows Yes.
e Find the rows of the Caravan where the Purchase column shows No and the MOSTYPE value isless than
f Obtain the subset of the Caravan data where the column names include M
g Obtain the subset of the Caravan data where the column names start with MHint: For this problem, you can use, dplyr library and the following code below.selecttempstartswithM
For this question, you need to use airquality data. You can access this data from R without anylibrary. This data includes some missing values which are shown as NA in the data set.
a Find total number of missing values.
b Find how many missing values are in each column.
c Delete the rows which contains missing data.
d Find the rows where Solar.R column includes missing values and remove these rows.
e Find the rows where Ozone column includes missing values and remove these rows.
f Find the rows where Solar.R and Ozone columns include missing values and remove these rows.
g Find the rows where Solar.R or Ozone columns include missing values and remove these rows.
Gaussian random numbers. One way to generate a random number taken from the Gaussian distribution is to use the BoxMuller formula:
where u and v are real numbers between and generated by runiffunction Compose a program that writes a standard Gaussian random variable. And calculate Z value.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
