Homework

Homework 3-DA6233

This homework is based on Shiny app. Q1. Create the following 3 Shiny apps. Print a table of first n observations from mpg data set, where n is the number of observations to print. The default value of n will be 6 while users can select a numeric input anywhere between 1 and 20 observations. (3 points) Shiny app is visible here: https://malshe.shinyapps.io/problem_1_1/ Let users select a city from among the five Texan cities and then print “You selected [name of the city]”.

DA 6813 Homework Solution

This note is pretty old. I have modified this note using dplyr package but still plenty of the code is still base R. The original note is available here: http://rpubs.com/malshe/224660. This file is just a small part of the original file. The original homework questions are available here: http://rpubs.com/malshe/224662 library(dplyr) library(here) Get the data in red <- read.csv(here::here("static", "data", "winequality-red.csv"), stringsAsFactors = F) red$wine <- "red" white <- read.csv(here::here("static", "data", "winequality-white.

Homework 2

Q1 A. Using presidential and economics data frames from ggplot2 package, recreate the following graphs. Before you start making the plots, first understand the data sets well. Start with checking the help panel by typing ?presidential and ?economics in the console. This will describe the variables in your data sets. Take a peek at the data using head() Get summary of the variables Note that you DON’T have to include all this in the homework.