- Notifications
You must be signed in to change notification settings - Fork14
Open
Labels
Description
It would be useful iftexcl_to_ssc() could optionally return a data.frame with class limits for sand, silt, clay given a texture class. This would help provide context for the estimated central / "RV" value, and the effect of optional specification of a custom clay content.
I have not investigated the easiest way to bolt this into the currenttexcl_to_ssc() code, but I note that logic from the NASIS validation used forssc_to_texcl() has the required information, but not yet in a "reusable" format:
Lines 298 to 312 in37d6e81
| df<- within(df, { | |
| texcl=NA | |
| texcl[silt>=79.99&clay<11.99]="si" | |
| texcl[silt>=49.99&clay<26.99& (silt<79.99|clay>=11.99)]="sil" | |
| texcl[clay>=26.99&clay<39.99&sand<=20.01]="sicl" | |
| texcl[clay>=39.99&silt>=39.99]="sic" | |
| texcl[clay>=39.99&sand<=45.01&silt<39.99]="c" | |
| texcl[clay>=26.99&clay<39.99&sand>20.01&sand<=45.01]="cl" | |
| texcl[clay>=6.99&clay<26.99&silt>=27.99&silt<49.99&sand<=52.01]="l" | |
| texcl[clay>=19.99&clay<34.99&silt<27.99&sand>45.01]="scl" | |
| texcl[clay>=34.99&sand>45.01]="sc" | |
| texcl[(silt+1.5*clay)<15]="s" | |
| texcl[(silt+1.5*clay)>=15& (silt+2*clay)<29.99]="ls" | |
| texcl[!is.na(sand)&!is.na(clay)& is.na(texcl)]="sl" | |
| }) |