<div>From Ari Giaretta</div><div><br></div><div>Dear friends. </div><div><br></div><div>Please could someone help me to run the tutorial in</div><div><br></div><div>Comparative methods with R PMC course, April 30 2012 </div>
<div><br></div><div>Something is going wrong</div><div><br></div><div>links for data files at: <a href="http://www2.unil.ch/phylo/teaching/pmc/comparative.pdf">http://www2.unil.ch/phylo/teaching/pmc/comparative.pdf</a></div>
<div><br></div><div><br></div><div>library(OUwie)</div><div><br></div><div>load("mutualism.r")</div><div><br></div><div>load("rakers.r")</div><div><br></div><div>load("tree.r")</div><div><br>
</div><div>tree <- ladderize(tree)</div><div><br></div><div>data <- data.frame(cbind(names(rakers), mutualism, rakers))</div><div><br></div><div>data[, 2] <- as.numeric(data[, 2])</div><div><br></div><div>data[, 3] <- as.numeric(data[, 3])</div>
<div><br></div><div>sim <- make.simmap(ladderize(tree), mutualism, nsim = 1)</div><div><br></div><div>OUwie(sim, data, model = c("OUM"), simmap.tree = TRUE)</div><div><br></div><div>nsim <- 10 #100 in the original</div>
<div><br></div><div>sim10 <- make.simmap(tree, mutualism, nsim = 10)</div><div><br></div><div>results <- data.frame(matrix(NA, nrow = 10, ncol = 2))</div><div><br></div><div>colnames(results) <- c("0", "1")</div>
<div><br></div><div>for (i in 1:nsim) {</div><div><br></div><div>model <- as.numeric(unlist(OUwie(sim10[[i]], data, model = c("OUM"),</div><div><br></div><div>simmap.tree = TRUE)))</div><div><br></div><div>results[, i] <- model$theta[c(1, 2), 1]</div>
<div><br></div><div>}</div><div><br></div><div><br></div><div>Error message</div><div><br></div><div>Begin subplex optimization routine -- Starting value: 1 </div><div>Finished. Summarizing results. </div><div>Error in model$theta : $ operator is invalid for atomic vectors</div>
<div>In addition: Warning message:</div><div>NAs introduced by coercion </div><div><br></div><div><br></div><div>Kind regards.</div><div><br></div><div><br></div><div><br></div>-- <br><div><div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Ariovaldo A. Giaretta</span></div>
<div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Laboratório... de Anuros Neotropicais</span></div><div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Universidade Federal de Uberlândia</span></div>
<div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">FACIP <span> </span>- Ciências Biológicas</span></div><div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Rua 20 nº 1.600 - Bairro Tupã</span></div>
<div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">38.304-402 - Ituiutaba – MG<br></span><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)"><br>
</span></div><div><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Tels: (34) 3271-5240; </span><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Fax (34) 3271-5249</span></div>
<div><span style="white-space:pre;background-color:rgb(255,255,255)"></span><span style="font-family:arial,helvetica,sans-serif;white-space:pre;background-color:rgb(255,255,255)">Currículo: <a href="http://lattes.cnpq.br/0244103788687530" target="_blank">http://lattes.cnpq.br/0244103788687530</a></span><span style="white-space:pre;background-color:rgb(255,255,255)"><p>
</p></span></div></div><br>