From 3ba6fdf7dcd9b43ee6b3454bc78e9b64850a90bb Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Wed, 5 Jun 2024 14:51:08 -0700 Subject: [PATCH] fetchNASIS/.formatLandformString: append `geomfmod` column to landscape, landform, and microfeature strings where present; thanks to Gabriel Benitez for suggestion --- R/utils.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/utils.R b/R/utils.R index d6908f4d..606dd185 100644 --- a/R/utils.R +++ b/R/utils.R @@ -209,10 +209,10 @@ } # landscape - landsc.string <- paste0(unique(i.ls$geomfname), collapse = name.sep) + landsc.string <- paste0(unique(trimws(paste(i.ls$geomfmod[!is.na(i.ls$geomfmod)], i.ls$geomfname))), collapse = name.sep) # microfeature - mf.string <- paste0(unique(i.mf$geomfname[!is.na(i.mf$geomfname)]), collapse = name.sep) + mf.string <- paste0(unique(trimws(paste(i.mf$geomfmod[!is.na(i.mf$geomfmod)], i.mf$geomfname[!is.na(i.mf$geomfname)]))), collapse = name.sep) # 2d hillslope position hspp <- unique(paste0(i.gm$hillslopeprof, ifelse(i.gm$cosurfmorphhpprv, "*",""))[!is.na(i.gm$hillslopeprof)]) @@ -246,7 +246,7 @@ if(getOption('soilDB.verbose', default=FALSE)) message(paste0('Using row-order. NA in geomfeatid:', soiliid)) - ft.string <- paste(unique(i.gm$geomfname), collapse = name.sep) + ft.string <- paste(unique(trimws(paste(i.gm$geomfmod[!is.na(i.gm$geomfmod)], i.gm$geomfname))), collapse = name.sep) return(data.frame( peiid = soiliid, landform_string = ft.string,