Dataset for working together

crawdad <- read.csv("https://collinn.github.io/data/crawdad.csv")

Exercises

Question 1: Create a “Question 1” in your R Markdown document with the appropriate header (3 # symbols). Then do the following:

Question 2: Type ?seq() into the console and look at the documentation. What does this function do? Use it to create a vector containing every multiple of 5 from 0 to 100. What is the mean value of this vector?

Question 3: Create a categorical variable that contains at least three possible values. Generate 50 observations using sample(). Create a frequency table and a bar plot of your results.

Dataset exercises

Question 4: Read the following data.frame into R

tips <- read.csv("https://collinn.github.io/data/tips.csv")

Then answer the following questions:

Question 5: Use the table() function to determine how many meals in the tips dataset had a bill larger than $20. Create a barplot with your results

Question 6: Create a histogram of the total bill. What appears to be the mean value? Check your guess using the mean() function.

Question 7: Use the plot() function along with $ to extract variables from the dataset to plot the relationship between total bill and tip amount, with total bill on the X-axis. How would you describe the relationship? Confirm your findings with the cor() function (remember you can use ? for functions you do not know).