archigrow(inputlie, inputtps, res=NULL, unitlength="px", unittime,
unitangle="d", rotation=0, numdate=NULL, finalscale=NULL,
coldyn, GRscale=NULL, main=NULL, xlab=NULL, ylab=NULL,
xlim=NULL, ylim=NULL, ...)
unitlength="mm"
or unitlength="cm"
.unitangle
) that must be used by the function to perform a clockwise rotation of the root system (see details).is.null(numdate)=FALSE
. If TRUE
, the root system architecture at the selected observation dates will be plotted with the same X and Y-axis scales to that used to draw the root system arunitlength
/unittime
) that must be used by the function to plot each vectorized root system.main=NULL
, the default title for each plot is the name of the corresponding lie file.xlab=NULL
, the default label for the X axis is X (unitlength
).ylab=NULL
, the default label for the Y axis is Y (unitlength
).unitlength
.unitlength
.unitlength
/unittime
).
Returns a X-Y plot for each vectorized root system located in inputlie
.archigrow
allows the X-Y plotting of vectorized root systems for selected observation dates with a colour code depending on the growth rate value of each link constituting the vectorized root systems.
The function archigrow
will successively locate and read the lie and tps files created by DART, compute a growth rate matrix and plot the vectorization results at selected observation dates for each analysed root system. First, archigrow
will check if all arguments have been written in the suitable mode. If res
and rotation
are specified, the function will check if the numeric values required by these arguments are positive. If is.null(numdate)=FALSE
, the function will also automatically check if the numeric values in numdate
are positive and sorted by increasing values. If an error occurs for one argument, the code stops and the corresponding error message will be returned by the function. Second, the function will use inputlie
and inputtps
to locate and read the raw lie and tps files created by DART. To run archigrow
efficiently, DART files must have been saved with their appropriate extensions (.lie or .tps). If inputtps
contains a single tps file, it will be used by archigrow
for each lie file located in inputlie
. If inputps
contains more than one tps file, the number of tps files in inputtps
must be equal to the number of lie files in inputlie
and corresponding lie and tps files must have the same name. If an error occurs at this step, a message will be returned by the function. Third, archigrow
will compute a growth rate matrix containing for each root constituting the vectorized root system its corresponding growth rate value at each observation date. Finally, archigrow
will plot each vectorized root system located in inputlie
at the observation dates specified by numdate
. By default (when numdate=NULL
), only the root system architecture of the last observation date will be plotted. If is.null(numdate)=FALSE
, archigrow
will only plot the root system architecture for the selected observation dates.
Due to technical limitations, it is sometimes easier to take a picture of a root system if it is rotated before image acquisition. In that case, the vectorized root system will depict a rotation compared to the natural plant root system. To make a correction, one can use rotation
to specify an angle value expressed in unitangle
that will be used by the function to rotate the vectorized root system clockwise before plotting and root system architecture parameters calculation.
Additional graphical parameters can also be used to personalize the graphical outputs (see par
). By default, a legend showing the colour gradient used to draw each vectorized root system is shown at the right side of the final plot.
Growth rates are calculated as follows:
par
.## Importation of example data sets
data(ch7lie)
data(ch7tps)
## Creation of a folder (DART_archigrow) inside a temporary directory to contain the lie and tps
## example datasets created by DART
dirDART <- paste(tempdir(), "/DART_archigrow", sep="")
dir.create(dirDART)
## Definition of the number of lie and tps files that will be saved inside dirDART
n <- 1
## Creation of lie and tps files inside dirDART
for (i in 1:n) {
write.table(ch7lie, file=paste(dirDART,"/ch7_",i,".lie", sep=""), row.names=FALSE)
write.table(ch7tps, file=paste(dirDART,"/ch7_",i,".tps", sep=""), row.names=FALSE)}
## Use of archigrow to plot the root system architecture for selected observation dates
## Use the same X and Y-axis scales to that used for the last observation date
ch7_output_1 <- archigrow(inputlie=dirDART, inputtps=dirDART, res=75, unitlength="cm",
unittime="day", coldyn=c("blue", "orange", "red"), numdate=c(15,30), finalscale=TRUE,
las=1, bty="l", asp=1, xaxp=c(0,30,3), lwd=2)
unlink(dirDART, recursive=TRUE)
Run the code above in your browser using DataLab