CTFSplot('p22',1:2,'stem') CTFSplot('p22',1:2,'stem',includespp=FALSE) CTFSplot('cerropeladocihhutp',1:2,'stem',includespp=FALSE) ls(2) search() options(width=60) head(gsp(2)) options(width=80) head(gsp(2)) options(width=90) head(gsp(2)) options(width=100) head(gsp(2)) search() search()[1:4] search()[1:5] attach('CTFSRPackage/stem/cerropeladocihhutp.stem2.rdata') ditch(2) ditch(2:5) attach('CTFSRPackage/stem/cerropeladocihhutp.stem1.rdata') attach('CTFSRPackage/stem/cerropeladocihhutp.stem2.rdata') search()[1:3] ls(2) ls(3) c1=cerropeladocihhutp.stem1 c2=cerropeladocihhutp.stem2 ls(2) ls(1) head(c1) head(c2) head(c1,2) head(c2,2) c1=cerropeladocihhutp.stem1 c2=cerropeladocihhutp.stem2 table(c1$status) table(c3$status) table(c2$status) table(c1$status,c2$status) dim(c1) dim(c2) c1=subset(cerropeladocihhutp.stem1,dbh>=100) dim(c1) summary(c1$dbh) summary(c2$dbh) table(c2$dbh<100,exclude=NULL) excluir=c2$dbh<100 table(excluir,exclude=NULL) excluir=c2$dbh<100 & !is.na(c2$dbh) table(excluir,exclude=NULL) excluir=c2$dbh<100 head(excluir) excluir excluir=c2$dbh<100 c2$sbh=100,15) head(c2,7) head(c2,8) head( c2$sp=='peraar',15) excluir=c2$dbh<100 head(excluir,15) head(subset(c2,excluir)) head(subset(c2,!excluir)) head(subset(c2,excluir==TRUE)) head(subset(c2,excluir)) head(subset(c2,excluir==FALSE)) head(subset(c2,!excluir)) table(excluir,exclude=NULL) head(subset(c2,is.na(excluir))) (subset(c2,is.na(excluir))) (subset(c2,is.na(excluir))$status) excluir = c2$dbh<100 | is.na(c2$dbh) head(excluir) head(excluir,25) table(excluir,exclude=NULL) table(excluir) excluir = c2$dbh<100 & !is.na(c2$dbh) table(excluir) table(excluir,exclude=NULL) incluir = c2$dbh>=100 | is.na(c2$dbh) table(incluir,exclude=NULL) c1=subset(cerropeladocihhutp.stem1,incluir==TRUE) c1=subset(cerropeladocihhutp.stem1) dim(c1) c1=subset(cerropeladocihhutp.stem1,incluir==TRUE) dim(c1) c2=subset(cerropeladocihhutp.stem2,incluir==TRUE) dim(c2) table(c1$dbh>=300) table(c1$dbh>=300,exclude=NULL) table(c1$dbh<300,exclude=NULL) table(c2$dbh>=300,exclude=NULL) incluir300=c1$dbh>=300 | c2$dbh>=300 table(incluir300,exclude=NULL) incluir = c2$dbh>=100 | is.na(c2$dbh) c1=subset(cerropeladocihhutp.stem1,incluir==TRUE) c2=subset(cerropeladocihhutp.stem2,incluir==TRUE) dim(c1) dim(dc2) dim(c2) table(incluir,exclude=NULL) c1=subset(cerropeladocihhutp.stem1,incluir==TRUE) incluir = c2$dbh>=100 | is.na(c2$dbh) table(incluir,exclude=NULL) incluir = c2$dbh>=100 | is.na(c2$dbh) c1=subset(cerropeladocihhutp.stem1,incluir==TRUE) c2=subset(cerropeladocihhutp.stem2,incluir==TRUE) dim(c1) dim(c2) crec=(c2$agb-c1$agb) head(c1) head(c1,2) head(c2,2) dias=(c2$date-c1$date) summary(dias) table(dias) 1740/365.25 crec=(c2$agb-c1$agb) summary(crec) head(crec,10) sum(crec) sum(crec,na.rm=TRUE) head(c2,2) sum(crec,na.rm=TRUE) canual=crec/dias summary(canual) canual=365.25*crec/dias summary(canual) summary(crec) plot(c1$dbh1,canual) dim(c1) length(anual) length(canual) plot(c1$dbh,canual) lm(canual~c1$dbh) summary(lm(canual~c1$dbh)) abline(lm(canual~c1$dbh)) plot(c1$dbh,canual,log='x') plot(c1$dbh,canual) abline(lm(canual~c1$dbh)) subset(c1,canual>.2) subset(c2,canual>.2) identify(c1$dbh,canual,c1$tag) plot(c1$dbh,canual) identify(c1$dbh,canual,c1$tag) subset(c1,tag=='09160') subset(c2,tag=='09160') plot(c1$dbh,canual) identify(c1$dbh,canual,c1$dbh) identify(c1$dbh,canual,c2$dbh) identify(c1$dbh,canual,c2$sp) dias=(c2$date-c1$date) canual=365.25*crec/dias subset(c1,canual<(-.2)) subset(c1,canual<(-.02)) subset(c2,canual<(-.02)) summary(canual) sort(canual) subset(c2,canual<(-.015)) subset(c2,canual<(-.015)) subset(c1,canual<(-.015)) subset(c2,canual<(-.015)) identify(c1$dbh,canual,c2$tag) sum(crec,na.rm=TRUE) subset(c1,c2$status=='D') subset(c1,c2$status=='D')$agb sum(subset(c1,c2$status=='D')$agb) sum(crec,na.rm=TRUE) sum(c1$agb,na.rm=TRUE) sum(c2$agb,na.rm=TRUE) sum(c2$agb,na.rm=TRUE)-sum(c2$agb,na.rm=TRUE) sum(c2$agb,na.rm=TRUE)-sum(c1$agb,na.rm=TRUE) sum(crec,na.rm=TRUE) - sum(subset(c1,c2$status=='D')$agb) subset(c2,status=='A' & is.na(dbh)) subset(c1,c2$status=='A' & is.na(c2$dbh)) subset(c2,c1$status=='P') subset(c1,c2$status=='A' & is.na(c2$dbh))$agb subset(c2,c1$status=='P')$agb sum(subset(c2,c1$status=='P')$agb) sum(c1$agb,na.rm=TRUE) sum(crec,na.rm=TRUE) sum(subset(c2,c1$status=='P')$agb) 191.9+34.3+2.6 sum(subset(c1,c2$status=='D')$agb) 191.9+34.3+2.6-13.6 sum(c2$agb,na.rm=TRUE) savehistory(file='~/meetings_workshops/Rmodeling/CIHH/history/hist24Mar.txt')