Learn R Programming

PHYLOGR (version 1.0.11)

read.phylog.matrix: Read a Phylogenetic Covariance Matrix

Description

Reads a dsc matrix file ---returned from the PDDIST program--- and converts into an R matrix for subsequent use.

Usage

read.phylog.matrix(x)

Arguments

x

An ASCII data file such as the *.dsc file generated by the PDDIST program

Value

a phylogenetic variance-covariance matrix that can be used in R functions, such as for GLS models.

References

Diaz-Uriarte, R., and Garland, T., Jr., in prep. PHYLOGR: an R package for the analysis of comparative data via Monte Carlo simulations and generalized least squares approaches.

Garland, T. Jr. and Ives, A. R. (2000) Using the past to predict the present: confidence intervals for regression equations in phylogenetic comparative methods. The American Naturalist, 155, 346-364.

See Also

matrix.D, phylog.gls.fit

Examples

Run this code
# NOT RUN {
<!-- %#ifdef unix -->
# }
# NOT RUN {
# First need to find where the example data sets are
 path.to.example <- paste(path.package(package="PHYLOGR"),"Examples/",sep="/") 
# }
# NOT RUN {
<!-- %#endif -->
# }
# NOT RUN {

# }
# NOT RUN {
<!-- %#ifdef windows -->
# }
# NOT RUN {
<!-- % path.to.example <- -->
# }
# NOT RUN {
<!-- %paste(path.package(package="phylog"),"Examples\\",sep="\\") # where the example data sets are -->
# }
# NOT RUN {
<!-- %#endif -->
# }
# NOT RUN {
example.dsc.file <- paste(path.to.example,"ifsmi.dsc",sep="") 
phylog.matrix1 <- read.phylog.matrix(example.dsc.file)


# You could jump directly to the call to the function if you
# are willing to enter the path explicitly.
# For example in some Linux systems the following works
# read.phylog.matrix("/usr/lib/R/library/PHYLOGR/Examples/hb12n.dsc")
# In Windows, maybe do:
# read.phylog.matrix("c:\\progra~1\\rw1001\\library\\PHYLOGR\\Examples\\hb12n.dsc")




# }

Run the code above in your browser using DataLab