## Importation of example data sets
data(ch7rac)
data(ch7tps)
## Creation of a folder (DART_architect) inside a temporary directory to contain the rac and tps
## example data sets created by DART
dirDART <- paste(tempdir(), "/DART_architect", sep="")
dir.create(dirDART)
## Definition of the number of rac and tps files that will be saved inside dirDART
n <- 2
## Creation of rac and tps files inside dirDART
for (i in 1:n) {
write.table(ch7rac, file=paste(dirDART,"/ch7_",i,".rac", sep=""), row.names=FALSE)
write.table(ch7tps, file=paste(dirDART,"/ch7_",i,".tps", sep=""), row.names=FALSE)}
## Use of architect to compute RSA parameters from DART output files
## rootdiv=1
ch7_output_2 <- architect(inputrac=dirDART, inputtps=dirDART, res=75, unitlength="cm")
## Use of the rootdiv argument to compute the distribution of the second-order lateral root number,
## length and density in the [0-15[, [15-30[, [30-45[ and [45-60[ first centimeters of the primary
## root
ch7_output_3 <- architect(inputrac=dirDART, inputtps=dirDART, res=75, unitlength="cm",
rootdiv=c(0,15,30,45,60))
unlink(dirDART, recursive=TRUE)
Run the code above in your browser using DataLab