Answered step by step
Verified Expert Solution
Question
1 Approved Answer
R programming: using lapply(), sapply(), tapply(), str(), summary() Consider the dataset found at http://www.math.hope.edu/isi/data/chap6/Tuna.txt The data contains measurements (in parts per million, or ppm) on
R programming: using lapply(), sapply(), tapply(), str(), summary()
Consider the dataset found at http://www.math.hope.edu/isi/data/chap6/Tuna.txt The data contains measurements (in parts per million, or ppm) on mercury levels for two types of tuna. (a) Read the dataset into R and save it to the workspace. Verify that the data has been loaded correctly. (b) Using one command, produce output that gives a brief overview of the data. In particular, the output should tell us: The class of the object The mbers of observations and variables .The names of the variables. .The class of each component in the object. (c) Using one command, compute summary statistics for each component in the data. In particular, the output should tell us: The nmber of fish of each type in the data. Numeric summary statistics for the mercury level of all the fish in the data (d) Using one command, compute the median mercury level for each type of tuna. Which type of tuna has a higher typical mercury level? (e) Using one command, compute the interquartile range of the mercury level for each type of tuna. Which type of tuna has more variability in mercury level? Consider the dataset found at http://www.math.hope.edu/isi/data/chap6/Tuna.txt The data contains measurements (in parts per million, or ppm) on mercury levels for two types of tuna. (a) Read the dataset into R and save it to the workspace. Verify that the data has been loaded correctly. (b) Using one command, produce output that gives a brief overview of the data. In particular, the output should tell us: The class of the object The mbers of observations and variables .The names of the variables. .The class of each component in the object. (c) Using one command, compute summary statistics for each component in the data. In particular, the output should tell us: The nmber of fish of each type in the data. Numeric summary statistics for the mercury level of all the fish in the data (d) Using one command, compute the median mercury level for each type of tuna. Which type of tuna has a higher typical mercury level? (e) Using one command, compute the interquartile range of the mercury level for each type of tuna. Which type of tuna has more variability in mercury levelStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started