Question: I would like someone to review my R code for question 5 . The number of rows and columns with body part names is the

I would like someone to review my R code for question 5. The number of rows and columns with body part names is the only thing that prints for question 5, and the data it prints is not referring the the Printed Results in question 5. Rather its referring to my earlier data. I hope this makes sense
Here is my code:
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```{r mydata}
# We'll reload this each time.
library(readxl)
# Read the Excel .csv file into a data frame
mydata - read.csv("C:/RIC/DATA-245-01/Body Measurements.csv")
# Display the first few rows of the data frame
head(mydata)
# Using the headers in the data frame we can make a scatterplot
plot(Neck..cm. ~ Weight..lb., data = mydata)
# If the data is two columns like ours is, then this gives the correlation matrix
# x vs x, x vs y, y vs x, and y vs y
result - cor(mydata)
print(result)
# This does the correlation test, 4th col vs 2nd col of our data
cor.test(mydata[,2], mydata[,4], alternative = "two.sided")
# mydata[1,] would be the first row of our data
# mydata[1,2] would be the data item in the first row and second column
# lm stands for linear model and finds the y intercept and slope for the lobf
lm(Neck..cm. ~ Weight..lb., data = mydata)
# the next line adds the lobf to our scatterplot
abline(lm(Neck..cm. ~ Weight..lb., data = mydata))
# using the lobf to predict y values for given x's in the
# range of the observed x's
x =205
y =0.08624*x +21.92250
print(y)
##Question 5.
```{r}
result - cor(mydata)
strong_correlations - which(abs(result)>0.85, arr.ind = TRUE)
strong_correlations
```
I would like someone to review my R code for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!