1 Set up

1.1 1) Load packages

1.2 2) Import data

1.3 3) Data Wrangling

1.4 4) Theme James

2 20 min Aggregate Graphs

2.1 Aggregate function

2.2 0-5 cm 20 minutes

2.3 5-10 cm 20 minutes

2.4 10-15 cm 20 minutes

2.5 15-25 cm 20 minutes

3 5 min Aggregate Graphs

3.1 Aggregate function

3.2 0-5 cm 5 minutes

3.3 5-10 cm 5 minutes

3.4 10-15 cm 5 minutes

3.5 15-25 cm 5 minutes

4 NRCS Aggregate Graphs

4.1 Aggregate function

4.2 0-5 cm NRCS

4.3 5-10 cm NRCS

4.4 10-15 cm NRCS

4.5 15-25 cm NRCS

5 Methods Comparison

5.1 20mwd and 5mwd Scatter plots

## Warning: Removed 82 rows containing non-finite values (stat_smooth).
## Warning: Removed 82 rows containing missing values (geom_point).
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database

## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database

## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning: Removed 82 rows containing non-finite values (stat_smooth).
## Warning: Removed 82 rows containing missing values (geom_point).

## Warning: Removed 82 rows containing non-finite values (stat_smooth).

## Warning: Removed 82 rows containing missing values (geom_point).

dont need for 20 mwd and 5 mwd /#```{r} /#Don’t need

/#one graph group by treatment

/#soils %>% ggplot(aes(x=x20mwd, y= x5mwd, color=treatment, shape=treatment))+ geom_point(size=1)+ labs(x=“20 minute method”, y=“5 minute method”, title=“Correlation between 20 minute Mean Weight Diameter vs 5 minute MWD”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE)

/#group by treatment

/#soils %>% ggplot(aes(x=x20mwd, y= x5mwd))+ facet_wrap(~treatment)+ labs(x=“20 minute method”, y=“5 minute method”, title=“Correlation between 20 minute Mean Weight Diameter vs 5 minute MWD”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE, color= “black”) + geom_point(size=.5)

/#group by horizon

/#soils %>% ggplot(aes(x=x20mwd, y= x5mwd))+ facet_wrap(~horizon)+ labs(x=“20 minute method”, y=“5 minute method”, title=“Correlation between 20 minute Mean Weight Diameter vs 5 minute MWD”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE, color= “black”) + geom_point(size=.5) /```

5.2 20mwd and NRCS Scatter plots

## Warning: Removed 27 rows containing non-finite values (stat_smooth).
## Warning: Removed 27 rows containing missing values (geom_point).

## Warning: Removed 27 rows containing non-finite values (stat_smooth).

## Warning: Removed 27 rows containing missing values (geom_point).

## Warning: Removed 27 rows containing non-finite values (stat_smooth).

## Warning: Removed 27 rows containing missing values (geom_point).

Dont need - 20 mwd and nrcs /#```{r}

/#one graph group by treatment

soils %>% ggplot(aes(x=x20mwd, y= nagg, color=treatment, shape=treatment))+ geom_point(size=1)+ labs(x=“20 minute method”, y=“NRCS hand method”, title=“Correlation between 20 minute Mean Weight Diameter vs NRCS Hand Method”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE)

/#group by treatment

soils %>% ggplot(aes(x=x20mwd, y= nagg))+ facet_wrap(~treatment)+ labs(x=“20 minute method”, y=“NRCS hand method”, title=“Correlation between 20 minute Mean Weight Diameter vs NRCS Hand Method”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE, color= “black”) + geom_point(size=.5)

/#group by horizon

soils %>% ggplot(aes(x=x20mwd, y= nagg))+ facet_wrap(~horizon)+ labs(x=“20 minute method”, y=“NRCS hand method”, title=“Correlation between 20 minute Mean Weight Diameter vs NRCS Hand Method”) + theme_classic()+ geom_smooth(method=“lm”, se=FALSE, color= “black”) + geom_point(size=.5) /```

5.3 MWD Bland-Altman plots

## Warning: package 'BlandAltmanLeh' was built under R version 4.0.4
## Warning: Removed 27 rows containing missing values (geom_point).

## Warning in plot.window(...): "na.rm" is not a graphical parameter
## Warning in plot.xy(xy, type, ...): "na.rm" is not a graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "na.rm" is not a
## graphical parameter

## Warning in axis(side = side, at = at, labels = labels, ...): "na.rm" is not a
## graphical parameter
## Warning in box(...): "na.rm" is not a graphical parameter
## Warning in title(...): "na.rm" is not a graphical parameter

## NULL
## Warning: Removed 82 rows containing missing values (geom_point).

## NULL
## 
## Call:
## lm(formula = x5mwd ~ x20mwd, data = soils)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.80093 -0.29022 -0.04859  0.24176  1.69966 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.47061    0.08500   5.537 1.44e-07 ***
## x20mwd       0.77571    0.07821   9.918  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5337 on 142 degrees of freedom
##   (82 observations deleted due to missingness)
## Multiple R-squared:  0.4092, Adjusted R-squared:  0.4051 
## F-statistic: 98.37 on 1 and 142 DF,  p-value: < 2.2e-16