The file \"flowers.csv\" file contains information on measurements of the iris f
ID: 3204738 • Letter: T
Question
The file "flowers.csv" file contains information on measurements of the iris flowers. Create an R data frame by the name "flower.data" that contains the data in the file. The following R code shows an example of how to round a vector of numbers to zero decimal places and then calculate some statistics using the rounded numbers. You might need some of the calculations for this assignment, but you might not need others. You would replace example$years with the name of the R object that you want to analyze (in other programming languages, you might call example$years a variable).
Questions
5. Assuming that you read the flowers.csv file into an R object called flower.data, run the following R code (do not paste the ">” character into R) and paste both the command and the output into your answer (you should see five names, each of which should be enclosed in quotes--if you do not see this, try again or contact your instructor):
> names(flower.data)
6. The number of observations in the "flower.data" data frame is: ____.
7. List the variables in the data frame (you can do this by entering the name of the R object that holds that data that you read using the read.csv command--you should have called it flower.data). If you do not see five columns of data, then there was a problem reading the input file--try again or contact your instructor. For each variable identify the type of the variable (factor or numeric).
The name and type of the 1st variable:________________
The name and type of the 2nd variable:________________
The name and type of the 3nd variable:________________
The name and type of the 4nd variable:________________
The name and type of the 5nd variable: ________________
8. Round the data for the variable Sepal.Length so that it contains integers, then find the frequency of the value 7 (not the relative frequency): ____.
Explanation / Answer
4. Output :
5.150 observations
6.
factor
8.
Frequency with 7 value is 29
4. Output :
'sepal_length' 'sepal_width' 'petal_length' 'petal_width' 'species'Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.