> plotTree(tree,ftype="i")
We want a nice plot of this tree, with minimal post hoc editing, but we need the genus names to be capitalized. Here's how to do it:
foo<-function(x){
x<-strsplit(x,split="")[[1]]
x[1]<-toupper(x[1])
x<-paste(x,collapse="")
}
tree$tip.label<-sapply(tree$tip.label,foo,USE.NAMES=FALSE)
plotTree(tree,ftype="i")
That's it.x<-strsplit(x,split="")[[1]]
x[1]<-toupper(x[1])
x<-paste(x,collapse="")
}
tree$tip.label<-sapply(tree$tip.label,foo,USE.NAMES=FALSE)
plotTree(tree,ftype="i")
BTW: I couldn't help but notice that this is my 300th post to the phytools blog! Thanks for reading.
Nice blog man!
ReplyDeleteI have a blog about Herpetology and science in general: http://www.projectherps.blogspot.mx/