Database Management > QUESTIONS & ANSWERS > HW3 (1) University of Texas, Dallas DATA MANAG 6326 (All)
1. Breakfast Cereals. Use the data for the breakfast cereals example discussed in class to explore and summarize the data as follows: a. Import the data to R. Copy the R code used below. cereals.df... <- read.csv("Cereals.csv", header = TRUE) b. Which variables are numerical? Which variables are categorical? Variable Type name Categorical mfr Categorical type Categorical calories Numerical protein Numerical fat Numerical sodium c. Compute the mean, median, min, max, and standard deviation for each of the numeric variables. Copy the code used and the resulting table below data.frame(mean=sapply(cereals.df[,4:16], men), sd=sapply(cereals.df[,4:16], sd), min=sapply(cereals.df[,4:16], min), max=sapply(cereals.df[,4:16], max), median=sapply(cereals.df[,4:16], median), length=sapply(cereals.df[,4:16], length), miss.val=sapply(cereals.df[,4:16], function(x) sum(length(which(is.na(x)))))) After removing the missing values in the columns d. Plot a histogram for each of the numeric variable. Copy the code used and the generated charts below. Based on the histograms and summary statistics, which variables have the largest variability? Which variables seem skewed? [Show More]
Last updated: 2 years ago
Preview 1 out of 10 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Nov 17, 2022
Number of pages
10
Written in
This document has been written for:
Uploaded
Nov 17, 2022
Downloads
0
Views
71
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·