[Ouwie-commits] help with OUwie

Ariovaldo Giaretta aagiaretta at gmail.com
Wed Aug 1 00:10:54 CEST 2012


>From Ari Giaretta

Dear friends.

Please could someone help me to run the tutorial in

Comparative methods with R PMC course, April 30 2012

Something is going wrong

links for data files at:
http://www2.unil.ch/phylo/teaching/pmc/comparative.pdf


library(OUwie)

load("mutualism.r")

load("rakers.r")

load("tree.r")

tree <- ladderize(tree)

data <- data.frame(cbind(names(rakers), mutualism, rakers))

data[, 2] <- as.numeric(data[, 2])

data[, 3] <- as.numeric(data[, 3])

sim <- make.simmap(ladderize(tree), mutualism, nsim = 1)

OUwie(sim, data, model = c("OUM"), simmap.tree = TRUE)

nsim <- 10 #100 in the original

sim10 <- make.simmap(tree, mutualism, nsim = 10)

results <- data.frame(matrix(NA, nrow = 10, ncol = 2))

colnames(results) <- c("0", "1")

for (i in 1:nsim) {

model <- as.numeric(unlist(OUwie(sim10[[i]], data, model = c("OUM"),

simmap.tree = TRUE)))

results[, i] <- model$theta[c(1, 2), 1]

}


Error message

Begin subplex optimization routine -- Starting value: 1
Finished. Summarizing results.
Error in model$theta : $ operator is invalid for atomic vectors
In addition: Warning message:
NAs introduced by coercion


Kind regards.



-- 
Ariovaldo A. Giaretta
Laboratório... de Anuros Neotropicais
Universidade Federal de Uberlândia
FACIP  - Ciências Biológicas
Rua 20 nº 1.600 - Bairro Tupã
38.304-402 - Ituiutaba – MG

Tels: (34) 3271-5240; Fax (34) 3271-5249
Currículo: http://lattes.cnpq.br/0244103788687530
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/ouwie-commits/attachments/20120731/35f686c0/attachment.html>


More information about the Ouwie-commits mailing list