Function to generate ‘framework’ or subset summary statistics and save them as a ‘.csv’ file in the R working directory. The file can be directly imported into a spreadsheet, e.g., MS Excel, for inspection, or into other software, e.g., a Geographical Information System (GIS) where the spatial information concerning the ‘framework’ units is available, e.g., ecoclassification units.
the name of the factor variable by which the data are to be subset.
name of the variable to be processed.
the name of the folder where the file is to be saved, a ‘/’ is appended before the synthesized file name, details of which are displayed on the current device. If no file is specified, the files are saved to the Working Directory, see Details below.
The file name is synthesized by concatenating the data frame name,
group and variable,
x, names, separated by
.csv. If a folder name has been provided in
file, for example,
file = "D://R_work//Project3", a ‘/’ is appended prior to the synthesized file name.
The file name for the
.csv file is displayed on the current device, and all other output is suppressed. The output file can be inspected with spread sheet software or a viewer of the user's choice.
The synthesis of the file name uses the data frame name which it is assumed is located in
To set the R working directory, if it has not already been set in a
first function, use at the R command line, for example,
setwd("C:\R\WDn"), where ‘n’ is some number, which will result in all saved output being placed in that folder. The folder must be created before the R session commences.
Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see
NAs in the data vector are counted and then removed prior to computing the summary statistics.
framework.stats is employed to compute the summary statistics.
Robert G. Garrett
1 2 3 4 5 6 7 8 9 10