- filepath
Path to csv file of plantCV output.
- mode
NULL (the default) or one of "wide" or "long", partial string matching is supported.
This controls whether data is returned in long or wide format. If left NULL then
the output format will be the same as the input format.
- traitCol
Column with phenotype names, defaults to "trait".
This should generally not need to be changed from the default. This,
labelCol, and valueCol are used to determine if data are in long format in their
raw state (the csv file itself).
- labelCol
Column with phenotype labels (units), defaults to "label".
This should generally not need to be changed from the default.
This is used with traitCol when mode="wide"
to identify
unique traits since some may be ambiguous
(ellipseCenter.x vs ellipseCenter.y, bins of histograms, etc)
- valueCol
Column with phenotype values, defaults to "value".
This should generally not need to be changed from the default.
- reader
The function to use to read in data,
defaults to NULL in which case data.table::fread
is used if filters are in place
and read.csv
is used otherwise.
Note that if you use read.csv
with filters in place then you will need to specify
header=FALSE
so that the piped output from awk is read correctly.
If fread is too slow for your needs then vroom::vroom()
may be useful.
- filters
If a very large pcv output file is read then it may be desireable
to subset it before reading it into R, either for ease of use or because of RAM limitations.
The filter argument works with "COLUMN in VALUES" syntax. This can either be a character vector
or a list of character vectors. In these vectors there needs to be a column name,
one of " in ", " is ", or " = " to match the string exactly, or "contains"
to match with awk style regex, then a set of comma delimited values to filter
that column for (see examples). Note that this and awk both use awk through pipe()
.
This functionality will not work on a windows system.
- awk
As an alternative to filters a direct call to awk can be supplied here,
in which case that call will be used through pipe()
.
- ...
Other arguments passed to the reader function.
In the case of 'fread' there are several defaults provided already
which can be overwritten with these extra arguments.