R/demoFieldBook.R

Defines functions demoFieldBook

Documented in demoFieldBook

#req lib: library(data.table)
#this function takes a user defined number of rows and columns representing a field experiment and plot rows and outputs a "demo" field book. 
#The output from this function can be used for input to the agriDemoPlot.R function that will assign Longitude and Latitude to each plot
demoFieldBook <- function(beginRow,endRow,beginColumn,endColumn,plotRows){
  rows = beginRow:endRow
  cols = as.data.table(beginColumn:endColumn)
  x <- apply(cols, 1, function(x) data.table(plotRowNum=rows,plotColumnNum=x))
  myRowCols = do.call(rbind,x)
  myRowCols$plotRows = plotRows
  myRowCols
}
cb-agr/agriPlot documentation built on April 14, 2022, 1:01 p.m.