Question: We typically aren't just working with scalars ( single values ) or a handful of vectors. Usually a statistician, analyst, or data scientist will be
We typically aren't just working with scalars single values or a handful of vectors. Usually a statistician, analyst, or data scientist will be working with a table or many tables filled with raw data. We'll call these tables data frames, and you can see the first six rows of the diamonds data frame from our first tutorial below.
head diamonds
We can call a column of a dataframe in several different ways. For example, diamonds $cut, diamonds "cut" and diamonds all access the cut column of the diamonds data frame but the first method returns a vector of values while the two methods making use of brackets return a data frame. Alter the code below so that you access the column as a vector instead of the cut column as a vector.
R Code
Start Over
diamonds $cut
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
