1 Initialization

rm(list=ls())
library(rsurveyutils)
library(here)
library(tidyverse)
library(ggthemr)
# theme_set(theme_bw())
ggthemr("fresh")
library(tidylog)

2 Preprocessing

2.1 Functions

2.2 Read data

filepath <- "data/raw/DSC Heat of Fusion For Jasp.csv"
df_dsc_heat_fusion_raw <- read_csv(here(filepath)) 
filepath <- "data/raw/PLLA DSC Tm Jasp.csv"
df_plla_dsc_tm_raw <- read_csv(here(filepath)) 
filepath <- "data/raw/DSC Tg .5 Jasp.csv"
df_dsc_tg_raw <- read_csv(here(filepath)) 
filepath <- "data/raw/TT Jasp without #21 Outlier.csv"
df_tt_wo_outlier_raw <- read_csv(here(filepath)) 

2.3 Process data

df_dsc_heat_fusion <- df_dsc_heat_fusion_raw %>% 
  rename_with(~str_replace_all(., " ", "_")) %>% 
  rename_with(~str_replace_all(., "\\(|\\)", "")) %>% 
  rename_with(tolower) 
df_plla_dsc_tm <- df_plla_dsc_tm_raw %>% 
  rename_with(~str_replace_all(., " ", "_")) %>% 
  rename_with(~str_replace_all(., "\\(|\\)", "")) %>% 
  rename_with(tolower) 
df_dsc_tg <- df_dsc_tg_raw %>% 
  rename_with(~str_replace_all(., " ", "_")) %>% 
  rename_with(~str_replace_all(., "\\(|\\)", "")) %>% 
  rename_with(tolower) 
df_tt_wo_outlier <- df_tt_wo_outlier_raw %>% 
  rename_with(~str_replace_all(., " ", "_")) %>% 
  rename_with(~str_replace_all(., "\\(|\\)|\\.|\\%", "")) %>% 
  rename_with(tolower) 

3 DSC Heat of Fusion

3.1 Peak temperature

fit <- aov(peak_temperature ~ group, df_dsc_heat_fusion)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  290.5   48.41   8.318 3.39e-06 ***
## Residuals   48  279.4    5.82                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

3.2 Peak width at half height

fit <- aov(peak_width_at_half_height ~ group, df_dsc_heat_fusion)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  977.6  162.93   19.03 3.41e-11 ***
## Residuals   48  411.0    8.56                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

3.3 Peak height

fit <- aov(peak_height ~ group, df_dsc_heat_fusion)
summary(fit)
##             Df  Sum Sq Mean Sq F value   Pr(>F)    
## group        6 1449632  241605   11.43 6.74e-08 ***
## Residuals   48 1015080   21147                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

3.4 Enthalpy normalized

fit <- aov(enthalpy_normalized ~ group, df_dsc_heat_fusion)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  154.4  25.739   4.957 0.000509 ***
## Residuals   48  249.2   5.192                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

3.5 Onset temperature

fit <- aov(onset_temperature ~ group, df_dsc_heat_fusion)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  178.0  29.670   5.248 0.000318 ***
## Residuals   48  271.4   5.653                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

4 PLLA DSC Tm

4.1 Peak temperature

fit <- aov(peak_temperature ~ group, df_plla_dsc_tm)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  42.36   7.061   6.847 2.72e-05 ***
## Residuals   48  49.49   1.031                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 5 observations deleted due to missingness
plot(fit)

4.2 Peak width at half height

fit <- aov(peak_width_at_half_height ~ group, df_plla_dsc_tm)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  40.91   6.819   12.84 1.36e-08 ***
## Residuals   48  25.49   0.531                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 5 observations deleted due to missingness
plot(fit)

4.3 Peak height

fit <- aov(peak_height ~ group, df_plla_dsc_tm)
summary(fit)
##             Df  Sum Sq Mean Sq F value   Pr(>F)    
## group        6 1342968  223828   23.85 7.43e-13 ***
## Residuals   48  450413    9384                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 5 observations deleted due to missingness
plot(fit)

4.4 Enthalpy normalized

fit <- aov(enthalpy_normalized ~ group, df_plla_dsc_tm)
summary(fit)
##             Df Sum Sq Mean Sq F value  Pr(>F)    
## group        6    605  100.84   31.64 4.4e-15 ***
## Residuals   48    153    3.19                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 5 observations deleted due to missingness
plot(fit)

4.5 Onset temperature

fit <- aov(onset_temperature ~ group, df_plla_dsc_tm)
summary(fit)
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        6   5.12  0.8534   0.321  0.923
## Residuals   48 127.48  2.6559               
## 5 observations deleted due to missingness
plot(fit)

5 DSC Tg .5

5.1 Change normalized

fit <- aov(change_normalized ~ group, df_dsc_tg)
summary(fit)
##             Df   Sum Sq   Mean Sq F value Pr(>F)  
## group        6 0.003755 0.0006258   2.209 0.0582 .
## Residuals   48 0.013601 0.0002834                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
plot(fit)

5.2 Onset X

fit <- aov(onset_x ~ group, df_dsc_tg)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6 115.07  19.179   24.81 3.73e-13 ***
## Residuals   48  37.11   0.773                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
plot(fit)

5.3 Delta CP

fit <- aov(delta_cp ~ group, df_dsc_tg)
summary(fit)
##             Df  Sum Sq  Mean Sq F value Pr(>F)  
## group        6 0.03964 0.006607   2.455 0.0376 *
## Residuals   48 0.12920 0.002692                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
plot(fit)

5.4 Midpoint

fit <- aov(midpoint ~ group, df_dsc_tg)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  86.16  14.360   17.54 1.26e-10 ***
## Residuals   48  39.29   0.819                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
plot(fit)

6 TT without #21 Outlier

6.1 Tensile stress at .02 offset yield

fit <- aov(tensile_stress_at_02_offset_yield_mpa ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## group        6  304.7   50.78   4.237 0.00173 **
## Residuals   47  563.3   11.99                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.2 Tensile stress at break

fit <- aov(tensile_strength_at_break_mpa ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## group        6   67.6  11.267   3.354 0.00782 **
## Residuals   47  157.9   3.359                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.3 Ultimate tensile stress

fit <- aov(ultimate_tensile_strength_mpa ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## group        6  142.2  23.693   7.581 1.01e-05 ***
## Residuals   47  146.9   3.125                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.4 Percent elongation at .02 offset yield

fit <- aov(percent_elongation_at_02_offset_yield ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## group        6  4.194  0.6990   3.145 0.0113 *
## Residuals   47 10.445  0.2222                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.5 Percent elongation at break

fit <- aov(percent_elongation_at_break ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value  Pr(>F)    
## group        6  300.3   50.05      15 1.7e-09 ***
## Residuals   47  156.8    3.34                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.6 Percent elongation at ultimate tensile stress

fit <- aov(percent_elongation_at_ultimate_tensile_strength ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## group        6  16.81   2.802   2.351 0.0456 *
## Residuals   47  56.02   1.192                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(fit)

6.7 Elastic modulus

fit <- aov(elastic_modulus_mpa ~ group, df_tt_wo_outlier)
summary(fit)
##             Df Sum Sq Mean Sq F value Pr(>F)
## group        6  21546    3591   1.855  0.109
## Residuals   47  90986    1936
plot(fit)

7 Session Info

sessionInfo()
## R version 4.2.2 (2022-10-31)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur ... 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] ggthemr_1.1.0      forcats_0.5.2      stringr_1.5.0      dplyr_1.0.10      
##  [5] purrr_0.3.5        readr_2.1.3        tidyr_1.2.1        tibble_3.1.8      
##  [9] ggplot2_3.4.0      tidyverse_1.3.2    here_1.0.1         rsurveyutils_0.1.0
## 
## loaded via a namespace (and not attached):
##  [1] lubridate_1.9.0     assertthat_0.2.1    rprojroot_2.0.3    
##  [4] digest_0.6.31       utf8_1.2.2          R6_2.5.1           
##  [7] cellranger_1.1.0    backports_1.4.1     reprex_2.0.2       
## [10] evaluate_0.19       highr_0.9           httr_1.4.4         
## [13] pillar_1.8.1        rlang_1.0.6         googlesheets4_1.0.1
## [16] readxl_1.4.1        rstudioapi_0.14     jquerylib_0.1.4    
## [19] rmarkdown_2.18      googledrive_2.0.0   bit_4.0.5          
## [22] munsell_0.5.0       broom_1.0.1         compiler_4.2.2     
## [25] modelr_0.1.10       xfun_0.35           pkgconfig_2.0.3    
## [28] htmltools_0.5.4     tidyselect_1.2.0    fansi_1.0.3        
## [31] crayon_1.5.2        tzdb_0.3.0          dbplyr_2.2.1       
## [34] withr_2.5.0         grid_4.2.2          jsonlite_1.8.4     
## [37] gtable_0.3.1        lifecycle_1.0.3     DBI_1.1.3          
## [40] magrittr_2.0.3      scales_1.2.1        vroom_1.6.0        
## [43] cli_3.5.0           stringi_1.7.8       cachem_1.0.6       
## [46] fs_1.5.2            xml2_1.3.3          bslib_0.4.1        
## [49] ellipsis_0.3.2      generics_0.1.3      vctrs_0.5.1        
## [52] tools_4.2.2         bit64_4.0.5         glue_1.6.2         
## [55] hms_1.1.2           parallel_4.2.2      fastmap_1.1.0      
## [58] yaml_2.3.6          timechange_0.1.1    colorspace_2.0-3   
## [61] gargle_1.2.1        rvest_1.0.3         knitr_1.41         
## [64] haven_2.5.1         sass_0.4.4