Lab 1: Getting Started with R, RStudio, and Quarto
Author
Mattie Pettit
Question 1: Introduction
Hello! My name is Mattie Pettit. I am from Louisville, Kentucky but I just transferred to UTC this semester, majoring in Chemical Engineering. I am excited to learn more about R and Quarto through this course and apply data analysis skills to real-world data sets.
Question 2: Maximum Moment Calculation
# Given valuesL <-10# span in metersq <-5# uniform load in kN/m# Maximum bending moment for a simply supported beamM_max <- q * L^2/8# Print resultcat("Maximum bending moment =", M_max, "kN·m\n")
Maximum bending moment = 62.5 kN·m
Question 3: Fish Dataset
Part a: Importing the Data
# Set working directory automaticallyWD <-getwd()if (!is.null(WD)) {setwd(WD)}# Load readxl packagelibrary(readxl)# Import the Excel fileFish <-read_excel("fish.xlsx")# Display the first few rowshead(Fish)
Figure 1: Scatterplot of Dover sole Length versus Depth for all sampled fish.
Part b: Observations and Conclusions
As shown in Figure 1, Depth tends to increase as Length increases for Dover sole.
This suggests that larger fish generally have greater body depth, indicating a moderate positive relationship between Length and Depth.
These observations are consistent with patterns described in the textbook (Levine, Ramsey, and Smidt, n.d.).
References
Levine, David M, Patricia P Ramsey, and Robert K Smidt. n.d. “Applied Statistics for Engineers and Scientists: Using Microsoft Excel and Minitab.”