```{r}
Load necessary libraries
library(tidyverse) library(lubridate)
Import data
data <- read_csv("stainless_steel_flat_bar.csv")
Data cleaning and preprocessing
data_cleaned <- data %>% mutate(date = ymd(date)) %>% filter(!is.na(surface_smoothness))
Analysis of surface smoothness
analysis <- data_cleaned %>% group_by(batch_id) %>% summarize(mean_smoothness = mean(surface_smoothness, na.rm = TRUE), sd_smoothness = sd(surface_smoothness, na.rm = TRUE))
Visualization
ggplot(analysis, aes(x = batch_id, y = mean_smoothness)) + geom_point() + labs(title = "Surface Smoothness Analysis of Stainless Steel Flat Bar", x = "Batch ID", y = "Mean Surface Smoothness") + theme_minimal()
print(analysis)
Comments
Post a Comment