It seems the function was masked from some other package:

This works:
require(geiger)
geo <- get(data(geospiza))
lphy <- geiger::rescale(geo$phy, "lambda", 0.9) # transform tree in one
fell swoop

Thanks again,


2014-05-16 15:49 GMT-03:00 Agus Camacho <[email protected]>:

> Thank you both,
>
> However,
>
> > geo <- get(data(geospiza))
> > lphy <- rescale(geo$phy, "lambda", 0.5) # transform tree in one fell
> swoop
> Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
>
> I got this error also for simulated and other real trees.
>
>
> 2014-05-16 15:24 GMT-03:00 Liam J. Revell <[email protected]>:
>
> It looks like transform.phylo has been deprecated. Use rescale.phylo.
>>
>> All the best, Liam
>>
>> Liam J. Revell, Assistant Professor of Biology
>> University of Massachusetts Boston
>> web: http://faculty.umb.edu/liam.revell/
>> email: [email protected]
>> blog: http://blog.phytools.org
>>
>>
>> On 5/16/2014 2:20 PM, Agus Camacho wrote:
>>
>>> Dear list users,
>>>
>>> Im trying to show what happens when we apply lambda transformations to a
>>> tree.
>>>
>>> For that, I was following swenson's book explanations:
>>>
>>> library(geiger)
>>> lambda.phylo=transform(tree,1)
>>>
>>> however,  I got the following errors:
>>>
>>>  lambda.phylo=transform(tree,"lambda")
>>>>
>>> Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors
>>> =
>>> stringsAsFactors) :   cannot coerce class ""phylo"" to a data.frame
>>>
>>>  lambda.phylo=geiger::transform(tree,"lambda")
>>>>
>>> Error: 'transform' is not an exported object from 'namespace:geiger'
>>>
>>> Any one would point to a workaround for branch transformation and
>>> posterior
>>> visualization of the tree?
>>>
>>> Thanks in advance.
>>> Agus
>>>
>>>
>>>
>>> _______________________________________________
>>> R-sig-phylo mailing list - [email protected]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>> Searchable archive at http://www.mail-archive.com/r-
>>> [email protected]/
>>>
>>>
>
>
> --
> Agustín Camacho Guerrero.
> Doutor em Zoologia.
> Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
> Biociências, USP.
> Rua do Matão, trav. 14, nº 321, Cidade Universitária,
> São Paulo - SP, CEP: 05508-090, Brasil.
>



-- 
Agustín Camacho Guerrero.
Doutor em Zoologia.
Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
Biociências, USP.
Rua do Matão, trav. 14, nº 321, Cidade Universitária,
São Paulo - SP, CEP: 05508-090, Brasil.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to