# this script writes a file of all rows to be measured in the PHEN plot. # Rows are ordered approximately from 1 - 80, but the next row is # randomly selected from an open row in the vicinity. jj <- data.frame(order = 0, row= 1:80) while (any(jj$order == 0)) { todo <- jj[jj$order==0, "row"] minRow <- min(todo) jj[jj$row == todo[sample(which(todo < minRow + 5), 1)], "order"] <- max(jj$order) + 1 } # end while # add column headers for paper datasheet jj$measurer <- "" jj$recorder <- "" jj$date <- "" jj$staple <- "" jj$note <- "" write.csv(jj[order(jj$order),], "signoutPhenRowsHeggLake.csv", row.names=FALSE)