inst/genData/collarCodes.R

#trNutrient <- c("No","Po","NP","Ct")
trNutrient <- c("N","P","NP","C")
trNutrient <- factor(trNutrient, levels=trNutrient)
trBlock <- 1:4
repl <- 1:2


collarCodes <- data.frame(collar=1:32, trNutrient=rep(trNutrient,each=2), trBlock=rep(trBlock,each=8), repl=repl)
replId <- with(collarCodes, paste(trNutrient,trBlock,trRep,sep="_"))
collarCodes$replId <- factor(replId, levels=replId)
blockId <- with(collarCodes, paste(trNutrient,trBlock,sep="_"))
collarCodes$blockId <- factor(blockId, levels=unique(blockId))
collarCodes
save( collarCodes, file=file.path("data","collarCodes.RData") )


.tmp.f <- function(){
	# splitting the replicate Id into components
	do.call( rbind, strsplit( replId, "_" , TRUE))
}

Try the RespChamberProc package in your browser

Any scripts or data that you put into this service are public.

RespChamberProc documentation built on May 2, 2019, 5:53 p.m.