From aagiaretta at gmail.com Wed Aug 1 00:10:54 2012 From: aagiaretta at gmail.com (Ariovaldo Giaretta) Date: Tue, 31 Jul 2012 22:10:54 -0000 Subject: [Ouwie-commits] help with OUwie Message-ID: >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: