Question: B . Section B - R Write all your commands in one script file that you should save as Script.R Capture the collected data
B Section BR
Write all your commands in one script file that you should save as "Script.R
Capture the collected data in the form of a data frame with a name of your choice
For the data frame that you created above,
a Write an R command to extract the element in the row column.
b Write an R command to extract the row.
c Write an R command to extract the column.
d Write an R command to extract the elements in rows columns to
e Write an R command to extract all people who like the BMW
f Write an R command to extract data on all the female respondents who like the BMW
g Write an R command to extract the data for all respondents who do not have Postgraduate degrees.
h Write an R command to extract the data for all respondents who BMW or Mercedes Benz..
i Add a new variable called heightcat and created by dividing the heights into equal categories named "short","Medium" and "tall".
j Write an R command to extract respondents whose height is below cm
k Sort your data frame in descending order of height.
l Export your data frame to the file "final.csv
m Create a histogram of the heights of these individuals. Comment on the histogram.
n Create a well labeled bar graph to depict the distribution of the car prefences of the respondents. Label the axis, and give a title to the bar graph. Comment on the bar graph.
o Perform a chisquared test to determine if the heightcat is independent of gender? Comment on the results of the chisquare test
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
