From 6c095c4016db4eb03728ee70a76ab41efa839381 Mon Sep 17 00:00:00 2001 From: Beaudette Date: Wed, 10 Apr 2024 13:09:06 -0700 Subject: [PATCH] Update ST-tree.R --- misc/ST-tree.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/ST-tree.R b/misc/ST-tree.R index 3369a0b..447f1f5 100644 --- a/misc/ST-tree.R +++ b/misc/ST-tree.R @@ -14,14 +14,14 @@ data('ST', package = 'SoilTaxonomy') ## this is the most detailed acreage accounting # subgroup acreages from SoilWeb / SSURGO -sg.ac <- read.table(file='databases/taxsubgrp-stats.txt.gz', header = FALSE, sep="|") +sg.ac <- read.table(file = '../SoilWeb-data/files/taxsubgrp-stats.txt.gz', header = FALSE, sep="|") names(sg.ac) <- c('subgroup', 'ac', 'n_polygons') # normalize names sg.ac$subgroup <- tolower(sg.ac$subgroup) # LEFT JOIN to acreage -ST <- merge(ST, sg.ac, by='subgroup', all.x=TRUE) +ST <- merge(ST, sg.ac, by = 'subgroup', all.x = TRUE) # set NA acreage to 0 ST$ac[which(is.na(ST$ac))] <- 0