Problem 2. You will need to use the CSV file \"house.csv\" for this problem, whi
ID: 3303079 • Letter: P
Question
Problem 2. You will need to use the CSV file "house.csv" for this problem, which can be found on Canvas. 1. First download this data set to your computer, then use read.csv to import it into R. Make sure assign it to something for further usage. The first row should 2. Report the number of rows and the number of columns of the data set. What are 3. Report the means of the last 8 columns. That means for each column of the last 8 be imported as variable names. the names of variables, i.e., column names? columns, you find its mean (Hint: Indering the submatrix first then use function colMeans.)Explanation / Answer
Sorry, I was unable to get the dataset. But if you will perform the given below commands on the dataset then you will get the solution.
1. D=read.csv(file.choose(),header=TRUE,col.names=1) # Stpre the data in name R
2. dim(D)
names(D)
3. R=D[, type number of last 8 columns]
mean(R) # This will give you the mean for last 8 columns
4. sd(D[1:10,]) # This will give you th standard deviaion for it.
5. class(chas) # This will give the class of variable chas
chas= as.factor(chas) # it will change the class to factor
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.