CTFSplot('bci',1:7) CTFSmort() CTFSgrowth() CTFSabund(data=TRUE) newtable = biomass.CTFSdb(RStemTable = bci.stem1, RTreeTable = bci.full1, plot = "bci", dbhunit = "mm") CTFSplot('bci',1:7,'stem') newtable = biomass.CTFSdb(RStemTable = bci.stem1, RTreeTable = bci.full1, plot = "bci", dbhunit = "mm") head(newtable[, c("sp", "dbh", "agb")]) sum(newtable$agb)/50 newtable7 = biomass.CTFSdb(RStemTable = bci.stem7, RTreeTable = bci.full7, plot = "bci", dbhunit = "mm") CTFSplot('bci',7) newtable7 = biomass.CTFSdb(RStemTable = bci.stem7, RTreeTable = bci.full7, plot = "bci", dbhunit = "mm") head(newtable7[, c("sp", "dbh", "agb")]) sum(newtable7$agb)/50 newtable5 = biomass.CTFSdb(RStemTable = bci.stem5, RTreeTable = bci.full5, plot = "bci", dbhunit = "mm") sum(newtable5$agb)/50 deltaagb=pop.change(bci.full5,bci.full7,type='agb') str(deltaagb) deltaagb=pop.change.sp(bci.full5,bci.full7,type='agb') deltaagb=pop.change.sp(bci.full5,bci.full7,type='agb',split=bci.full5$sp) deltaagb=pop.change.dbh(bci.full5,bci.full7,type='agb',split=bci.full5$sp) str(deltaagb) head(deltaagb$agb) plot('10_2'~'10_1',data=deltaagb) plot(10_2~10_1,data=deltaagb) plot(deltaagb[,1],deltaagb[,2]) plot(deltaagb$agb[,1],deltaagb$agb[,2]) plot(deltaagb$agb[,1],deltaagb$agb[,2],log='xy') str(bci.full5) str(bci.stem5) table(bci.full5$nostems) options(width=130) data.frame(table(bci.full5$nostems)) subset(bci.full5,nostems>25) options(width=80) subset(bci.full5,nostems>25) options(width=90) subset(bci.full5,nostems>25) subset(bci.stem5,tag=='114636') str(bci.stem5) dim(subset(bci.stem5,tag %in% subset(bci.full5,nostes>10)$tag & status=='A')) dim(subset(bci.stem5,tag %in% subset(bci.full5,nostems>10)$tag & status=='A')) dim(subset(bci.stem5,tag %in% subset(bci.full5,nostems>20)$tag & status=='A')) dim(subset(bci.stem5,tag %in% subset(bci.full5,nostems>22)$tag & status=='A')) head(subset(bci.stem5,tag %in% subset(bci.full5,nostems>22)$tag & status=='A')) head(subset(bci.stem5,tag %in% subset(bci.full5,nostems==3)$tag & status=='A')) head(subset(bci.stem5,tag %in% subset(bci.full5,nostems==3)$tag & status=='A'),9) head(subset(bci.full5,nostems==3)$tag) subset(bci.full5,tag=='00015') subset(bci.full5,tag=='000015') search() ls(11) ls(10) str(wsg.ctfs2) head(wsg.ctfs2) args(biomass.CTFSdb) newtable2 = biomass.CTFSdb(RStemTable = bci.stem2, RTreeTable = bci.full2, plot = "bci", dbhunit = "mm") str(newtable2) sum(newtable5$agb) newtable2 = biomass.CTFSdb(RStemTable = bci.stem2, RTreeTable = bci.full2, plot = "bci", dbhunit = "mm") total=abundance(bci.full5,mindbh=10) total total=abundance(bci.full5,mindbh=10,type='agb') total total=abundance(bci.full5,mindbh=10,type='agb')/50 total=abundance(bci.full5,mindbh=10,type='agb')$agb/50 abundance(bci.full5,mindbh=10,type='agb')$agb/50 abundance(bci.full5,mindbh=10,type='agb')$agb abundance(bci.full7,mindbh=10,type='agb')$agb abundance(bci.full7,mindbh=10,type='agb')$agb/50 totalsp=abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$sp)$agb/50 head(totalsp) tail(totalsp) dim(totalsp) which.max(totalsp$all) totals[250,] totalsp[250,] subset(totalsp,all>15) subset(totalsp,all>10) totalsp=abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$sp)$agb/50 totalsp=abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$sp)$agb save.history(file='~/meeting_workshops/Rmodeling/FrontRoyal/histR23July2013.txt') savehistory(file='~/meeting_workshops/Rmodeling/FrontRoyal/histR23July2013.txt') dir('/home/condit/meeting_workshops') savehistory(file='~/meetings_workshops/Rmodeling/FrontRoyal/histR23July2013.txt') dir('/home/condit/meetings_workshops/Rmodeling') dir('/home/condit/meetings_workshops/Rmodeling/FrontRoyal') system(ls -ll /home/condit/meetings_workshops/Rmodeling/FrontRoyal) system('ls -ll /home/condit/meetings_workshops/Rmodeling/FrontRoyal') system('ls -ll /home/condit/meetings_workshops/Rmodeling/FrontRoyal/history') savehistory(file='~/meetings_workshops/Rmodeling/FrontRoyal/history/histR23July2013.txt') abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$status)$agb abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$status)$agb/50 half=bci.full5$gx<500 abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$status,split2=half)$agb/50 half=character() half[bci.full5$gx<500]='west' half[bci.full5$gx>=500]='east' abundance(bci.full5,mindbh=10,type='agb',split1=bci.full5$status,split2=half)$agb/50 abundance(bci.full2,mindbh=10,type='agb',split1=bci.full5$status,split2=half)$agb/50 39.9/(39.9+132.4) 36.7/(36.7+105) abundance(bci.full2,mindbh=10,type='agb',split1=bci.full5$status,split2=bci.full5$sp)$agb/50 abundance(bci.full2,mindbh=10,type='agb',split2=bci.full5$status,split1=bci.full5$sp)$agb/50 agbmort=abundance(bci.full2,mindbh=10,type='agb',split2=bci.full5$status,split1=bci.full5$sp)$agb/50 head(agbmort) str(agbmort) agbmort$rate=agb$D/(agb$D+agb$A) agbmort$rate=agbmort$D/(agbmort$D+agbmort$A) head(agbmort) agbmort$total=(agbmort$D+agbmort$A) head(agbmort) plot(rate~total,data=agbmort) plot(rate~total,data=agbmort,log='x') agbmort=abundance(bci.full2,mindbh=10,type='agb',split2=bci.full5$status,split1=bci.full5$sp)$agb/50 agbmort$rate=agbmort$D/(agbmort$D+agbmort$A) agbmort$total=(agbmort$D+agbmort$A) plot(rate~total,data=agbmort,log='x') bcichange=pop.change(bci.full5,bci.full6,type='abund',split1=bci.full5$sp,mindbh=10) bcichange=pop.change(bci.full2,bci.full5,type='abund',split1=bci.full5$sp,mindbh=10) names(bcichange) str(bcichange) bcichange=pop.change(bci.full2,bci.full5,type='agb',split1=bci.full5$sp,mindbh=10) str(bcichange) assemble.demography(bcichange,type='agb') deltaagb=assemble.demography(bcichange,type='agb') head(deltaagb) bcichange=pop.change(bci.full2,bci.full5,type='agb',split1=bci.full5$sp,mindbh=10) deltaagb=assemble.demography(bcichange,type='agb') head(deltaagb) subset(deltaagb,little.r>.05) subset(deltaagb,little.r>.1) bcichange=pop.change(bci.full2,bci.full5,type='agb',split1=bci.full5$sp,mindbh=10) deltaagb=assemble.demography(bcichange,type='agb') head(deltaagb) plot(AGB.2~AGB.1,data=deltaagb) plot(AGB.2~AGB.1,data=deltaagb,log='xy') abline(1,0) plot(AGB.2~AGB.1,data=deltaagb,log='xy') abline(0,1) identify(deltaagb$AGB.1,deltaagb$AGB.2,rownames(deltaagb)) plot(deltaagb$AGB.1,deltaagb$AGB.2) identify(deltaagb$AGB.1,deltaagb$AGB.2,rownames(deltaagb)) abline(0,1) bcichange=pop.change(bci.full2,bci.full5,type='agb',split1=bci.full5$sp,mindbh=10) plot(AGB.2~AGB.1,data=deltaagb,log='xy') bcichange=pop.change(bci.full2,bci.full5,type='agb',split1=bci.full5$sp,mindbh=10) deltaagb=assemble.demography(bcichange,type='agb') plot(deltaagb$AGB.1,deltaagb$AGB.2) abline(0,1) identify(deltaagb$AGB.1,deltaagb$AGB.2,rownames(deltaagb)) savehistory(file='~/meetings_workshops/Rmodeling/FrontRoyal/history/histR23July2013.txt')