soiltexture_gui {soiltexture}R Documentation

Text-based menu for plotting and classifying soil texture data


Text-based menu for plotting and classifying soil texture data.

If you simply want to obtain a figure with an empty soil texture triangle, just call soiltexture_gui() and follow the instructions.

If you want to a figure with your own soil texture data on top of a texture triangle, you must first prepare a tabular text file containing your texture data, as .txt or .csv. Such a file can be prepared with MS Excel or Libre Office, and exported as CSV ("CSV (comma delimited) (*.csv)" or "CSV (MS-DOS) (*.csv)" for example). The table must contain headers (column names) and it must the following columns and headers: CLAY, SILT and SAND. Other columns are allowed and will be ignored. In the texture data file, each row represent a record (a sample) and each column a variable.

You will be asked about the format of this text file, in particular about the field / column separator (it can be commas, semi-colons, tabulations or (multiple) spaces) and the decimal mark (comma or dot). The file encoding can be either the native encoding of the computer, or UTF-8 (without BOM).

The sum of the texture of each row must be either 1 (if expressed as a fraction) or 100 (if expressed as a percentage). You will be asked about the unit. Only small divergences from 1 or 100 are allowed, but you will be asked if you want to normalise your data beforehand, so larger divergences are possible.

You will also be asked which texture classification system you want to use (FAO, USDA, etc.). It is possible to plot a texture triangle without texture classification.

Finally, if you have chosen a texture classification system, soiltexture_gui can classify each record according to this classification system and return you the texture class of each record, as a CSV text file.

The texture triangle is show to you with R default graphical device, and you can choose to export a PNG figure of the resulting texture triangle (between 512 and 2048 pixel width/height, depending on what you chose).


soiltexture_gui(main = NULL, graphics = FALSE, ...)



Single character string. Main title of the texture diagram. Set to NA to obtain a a slightly bigger figure, with no title. See TT.plot.


See select.list.


Additional parameters passed to or (subsequently) to read.table.


Either NULL if no texture data was imported, or a data.frame (if texture data was imported). The texture classification is also returned (when the user asked for a texture classification).


Julien Moeys [aut, cre], Wei Shangguan [ctb], Rainer Petzold [ctb], Budiman Minasny [ctb], Bogdan Rosca [ctb], Nic Jelinski [ctb], Wiktor Zelazny [ctb], Rodolfo Marcondes Silva Souza [ctb], Jose Lucas Safanelli [ctb], Alexandre ten Caten [ctb]


library( "soiltexture" )

#   Call the text graphical user interface

## +-------------------------------+
## |    The Soil Texture Wizard    |
## +-------------------------------+
## Text-based interface for plotting and classifying soil texture data
## R is not run interactively. Operation cancelled. See ?interactive
#   ... and follow the instructions indicated to you!

[Package soiltexture version 1.3.1 Index]