Question: Question 3 Part A ) Run the next cell to read in the data set called data 1 and to check its dimension. mydata

Question 3
Part A) Run the next cell to read in the data set called "data1" and to check its dimension.
mydata = read.table("data1")
dim(mydata)
100001
"mydata" is a "data frame" which is essentially a table. Because the dimension is 10,000 by 1, it is a single column of data. In this case it is going to be easier to remove the more complicated table struction and turn it into a vector. Do you recall how we use the letter c to define a vector? Run the next cell. Notice the check before and after the transformation as to whether or not we have a vector.
is.vector(mydata)
mydata = c(unlist(mydata))
is.vector(mydata)
FALSE
TRUE
In the next cell, make a histogram of the data. Be sure to use "density" on the y-axis. Use the given "breaks" vector. (i.e. use breaks=br in your histogram) Usually you will have to determine the breaks yourself by looking at the minimum and maximum of the data and trying different bin widths. We are giving you a specific vector of breaks here to help with the autograder. We are also giving the histogram a name for the autograder-- usually you would not have anything before "hist" on that line.

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 Databases Questions!