[Phylobase-commits] r205 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 21 07:30:50 CEST 2008
Author: pdc
Date: 2008-07-21 07:30:50 +0200 (Mon, 21 Jul 2008)
New Revision: 205
Modified:
pkg/man/check.phylo4d.Rd
Log:
tidy up
todo: change variable names in this example
Modified: pkg/man/check.phylo4d.Rd
===================================================================
--- pkg/man/check.phylo4d.Rd 2008-07-18 19:11:21 UTC (rev 204)
+++ pkg/man/check.phylo4d.Rd 2008-07-21 05:30:50 UTC (rev 205)
@@ -49,31 +49,33 @@
require(ape)
#generate a tree and some data
p3 <- rcoal(5)
-dat <- data.frame(a=rnorm(5),b=rnorm(5),row.names=p3$tip.label)
+dat <- data.frame(a = rnorm(5), b = rnorm(5), row.names = p3$tip.label)
dat.defaultnames <- dat
row.names(dat.defaultnames) <- NULL
-dat.superset <- rbind(dat,rnorm(2))
-dat.subset <- dat[-1,]
+dat.superset <- rbind(dat, rnorm(2))
+dat.subset <- dat[-1, ]
#create a phylo4 object from a phylo object
-p4 <- as(p3,"phylo4")
+p4 <- as(p3, "phylo4")
#create phylo4d objects with tip data
-p4d <- phylo4d(p4,dat)
+p4d <- phylo4d(p4, dat)
check_data(p4d)
-p4d.sorted <- phylo4d(p4,dat[5:1,])
-try(p4d.nonames <- phylo4d(p4,dat.defaultnames))
-p4d.nonames <- phylo4d(p4,dat.defaultnames,use.tip.names=FALSE)
+p4d.sorted <- phylo4d(p4, dat[5:1, ])
+try(p4d.nonames <- phylo4d(p4, dat.defaultnames))
+p4d.nonames <- phylo4d(p4, dat.defaultnames, use.tip.names = FALSE)
\dontrun{
-p4d.subset <- phylo4d(p4,dat.subset)
+p4d.subset <- phylo4d(p4, dat.subset)
}
-\dontrun{p4d.subset <- phylo4d(p4,dat.subset,missing.tip.data="OK")
-try(p4d.superset <- phylo4d(p4,dat.superset))
-p4d.superset <- phylo4d(p4,dat.superset,extra.tip.data="OK")
+\dontrun{
+p4d.subset <- phylo4d(p4, dat.subset, missing.tip.data = "OK")
+try(p4d.superset <- phylo4d(p4, dat.superset))
+p4d.superset <- phylo4d(p4, dat.superset, extra.tip.data = "OK")
}
#create phylo4d objects with node data
-nod.dat <- data.frame(a=rnorm(4),b=rnorm(4))
-p4d.nod <- phylo4d(p4,node.data=nod.dat,which="node")
+nod.dat <- data.frame(a = rnorm(4), b = rnorm(4))
+p4d.nod <- phylo4d(p4, node.data = nod.dat, which = "node")
#create phylo4 objects with node and tip data
-p4d.all1 <- phylo4d(p4,node.data=nod.dat,tip.data=dat,which="all")
-p4d.all2 <- phylo4d(p4,all.data=rbind(dat,nod.dat),which="all")
+p4d.all1 <- phylo4d(p4, node.data = nod.dat, tip.data = dat,
+ which = "all")
+p4d.all2 <- phylo4d(p4, all.data = rbind(dat, nod.dat), which = "all")
}
\keyword{misc}
More information about the Phylobase-commits
mailing list