groupData | R Documentation |
Group primary single-stock data files in subdirectories, depending on what columns each data file contains.
groupData(dir, quiet = FALSE)
dir |
directory containing the primary data files. |
quiet |
whether to suppress screen output. |
Files are copied into subdirectories. As a byproduct, a list is returned, describing which subdirectories contain which data files.
A primary data file can have a filename such as
‘Yellowtail_snapper_Mexico.csv’ and columns such as
stockid|scientificname|commonname|year|catch|stocklong
.
In addition, the data file may have columns called best_effort
and/or
best_index
, containing the effort and/or index series to be used in
the SOFIA analysis.
This function creates four subdirectories:
both
- for data files containing both effort and index data
effort
- for data files containing effort data (and possibly
also index)
index
- for data files containing index data (and possibly also
effort)
neither
- for data files containing neither effort nor index
data
The object returned has an attribute count
, showing the number of data
files in each subdirectory. The number of original (unique) data files will
be:
both + (effort-both) + (index-both) + neither
The functions groupData
and convertData
are used together:
first group, then convert.
Arni Magnusson.
convertData
converts primary data to combined data.
SOFIA-package
gives an overview of the package.
## Not run: groupData("Data_files_Area_31_3") groupData("Data_files_Area_31_3", quiet=TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.