#Afternoon - so, we decided/stuart pointed out that We only need 680 positions/site, because the seeds will be in between the plug points. So I'm doing the whole thing again but trying to get 680 points, or thereabouts. cc <- read.csv("Plug Datasheet_Verification_04July2010_a.csv") str(cc) Cleaning up cc: cc\$tray wantextra<-c("19", "20","21", "22","23", "24", "25", "26", "27", "28") cc cc<-cc[!is.na(cc\$tray),] #removed the extra na rows cc<-cc[!cc\$tray %in% wantextra,] cc #I have to re-randomize the trays, and make sure that there are 3 of each kind in each plot: sample(1:9,3) sample(10:18,3) #bm = Bob Mahoney: #rune = Runestone: #hlh = Hegg Lake Hill sample(1:9) #[1] 2 9 7 8 3 1 5 4 6 sample(10:18) #[1] 17 16 15 18 13 12 10 14 11 #so: wantbm<-c("2", "9", "7", "17","16", "15") wantrune<-c("8","3", "1", "18", "13", "12") wanthlh<-c("5", "4", "6", "10", "14", "11") cc\$site<-"bm" str(cc) cc[cc\$tray %in% wantrune,"site"] cc[cc\$tray %in% wantrune,"site"]<-"rune" cc[cc\$tray %in% wanthlh,"site"] cc[cc\$tray %in% wanthlh,"site"]<-"hlh" head(cc) tail(cc) #so cc now has a site column, and the trays have been randomized into each site. table(cc\$site, cc\$status) # This has the number of plugs/site #I'm going to stick w/ 8 pos/meter, plus 1 pos at the end of each row. I'll stake the 0 and the last positions to mark my rows. Maybe w/ metal disks. 8*8.625*10 #this would work, 690 positions + 10, so total of 700 positions. 8 pos/meter * 8.625 meters/row * 10 rows + the 10 "0" rows #plots will have 5 sets of double rows (10cm apart), each double will be 1m apart. (8*8)+(6) #number of pos. per row (70) 70*10 700*3 # = 2100 = the total number of positions. #stake either end of the row, so we won't be actually planting positions 0 and 8.625 1.1*5 #Plot will be 5.5 meters long, and 8.625 meters wide #10 rows per site, 30 total rows rep(1:30, each=70) df<-data.frame(pos=rep(seq(0,8.625, by= .125), 30), row=rep(1:30, each=70)) str(df) dim(df) 2100-(60) 2040/3 #= 680 = perfect, the max number of envelope positions is 671, so this will be great! df\$site<-"bm" wantrune2<-11:20 wanthlh2<-21:30 str(df) df[df\$row %in% wantrune2,"site"] df[df\$row %in% wantrune2,"site"]<-"rune" df[df\$row %in% wanthlh2,"site"] df[df\$row %in% wanthlh2,"site"]<-"hlh" str(df) head(df) tail(df) table(df\$row, df\$site) write.csv(df, "KG_positions_03July.csv", row.names= FALSE)