# Lab 2 R Code (not comprehensive) #Reading in the data tips <- read.table("http://myweb.uiowa.edu/pbreheny/data/tips.txt", header = T) head(tips) #### Bonus question hints ### # This is how I'd calculate bill per person ## Similar method for tippct billperperson <- tips$TotBill / tips$Size sum(tips$Time == "Night") #Gives me the total number of night customers sum(tips$Time == "Day") #Gives me the total number of day customers