[Phylobase-devl] Urgent! problems with installing

François Michonneau francois.michonneau at gmail.com
Wed Jul 2 17:48:45 CEST 2008


Hi Marguerite

I think I found the bug. I looked at that very quickly so I might be wrong.

It comes from the function read.nexus. Towards the end there is:

     if (Ntree == 1) {
         trees <- trees[[1]]
         #trees$tip.label <- TRANS[, 2]
     }
     else {
         if (!is.null(tree.names))
             names(trees) <- tree.names
         if (translation)
             attr(trees, "TipLabel") <- TRANS[, 2]
         class(trees) <- "multiPhylo"
     }
     if (length(grep("[\\/]", file)) == 1)
         file <- paste(getwd(), file, sep = "/")
     attr(trees, "origin") <- file
     trees


However, the variable TRANS is defined only if the word "translate" is 
present (look at the beginning of read.nexus) in the nexus file. Thus 
the error message. I haven't spent enough time to try to figure out what 
this line was doing specifically, but if this line is commented then 
there is no error message and it still works.

Cheers,
François

Marguerite Butler wrote:
> Hi Ben,
> 
> 
> Thanks for the quick reply!
> 
>>
>>      No problems here with 2.7.0.
>>   Can you send a read.nexus example for me to try?
>>
> 
> Here is the nexus file that read.nexus couldn't read under R 2.7.1 
> yesterday (this was a problem both for macs and pc's on several people's 
> computers -- I had a small group of students try it). When I downgraded 
> it read in fine.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> It would be great if you could give it a try.
> 
>>
>>> The binaries were available on the r-forge site for a while, but not 
>>> anymore. 
>>
>>   It looks (?) like they're there -- I even downloaded the file
>> and it seems to have the right bits in it, but I can't tell
>> without trying to install it ...
>>
> 
> Oops! Sorry you are right, the binaries are there. I guess I got myself 
> confused because it is not passing the check. However, it is not 
> possible to install the binaries unless you have 2.7. 
> 
> The real problem is that I can't install from source in 2.6.2. 
> 
>> But my problem is that I can't even install from source. When I
>>> did R CMD check on the package, I get one warning:
>>> ====
>>> * checking if this is a source package ... WARNING
>>> Subdirectory 'pkg/src' contains object files.
>>> ====
>>> I found "phylobase.so" in pkg/src. Is this supposed to be there? It 
>>> might be the culprit because the error I get when I try to load 
>>> phylobase is:
>>>  > require(phylobase)
>>> Loading required package: phylobase
>>> Error in dyn.load(file, ...) :
>>>   unable to load shared library 
>>> '/Library/Frameworks/R.framework/Resources/library/phylobase/libs/i386/phylobase.so': 
>>>   
>>> dlopen(/Library/Frameworks/R.framework/Resources/library/phylobase/libs/i386/phylobase.so, 
>>> 6): Library not loaded: 
>>> /Library/Frameworks/R.framework/Versions/2.7/Resources/lib/libR.dylib
>>>   Referenced from: 
>>> /Library/Frameworks/R.framework/Resources/library/phylobase/libs/i386/phylobase.so 
>>>   Reason: image not found
>>> Which doesn't make a whole lot of sense since I'm installing from 
>>> source on R 2.6.2.
>>
>>   It seems it's still looking for a 2.7 library?
> 
> Yes, that is what it looks like to me.  Why would it be doing that? I 
> tried trashing the phylobase directory in the location on my computer 
> where R is installed, which is here: 
> 
> /Library/Frameworks/R.framework/Resources/library/phylobase
> 
> before re-installing, in case there was something in there from a 
> previous installation with 2.7 still lurking around, but it didn't seem 
> to help. Is there anything else I should do for a "clean" install of 
> phylobase?
> 
>>
>>> So I went back and removed the "phylobase.so" from the pkg/src 
>>> directory (the version I got from the svn repository -- revision 
>>> 192), and tried rebuilding. It passed the check this time, so I 
>>> installed. But when I try loading, I still get the same error above 
>>> from my require(phylobase) command??
>>> Has anyone else had problems?
>>> I don't think it's entirely a 2.6.2 issue because I don't think it's 
>>> working for the 2.7.X versions either, otherwise wouldn't there be 
>>> binaries available?
>>> I am preparing for the NESCENT course, so this is pretty urgent. Any 
>>> help would be greatly appreciated.
>>> Marguerite
>>
>>    I will do anything I can to help but am a little restricted
>> since it's working fine for me and I don't have a Mac ...
>>
> 
> If it turns out that we can only use ape with 2.6.2, and phylobase with 
> 2.7, is there a way to switch between R versions on the same computer 
> (of course in different R sessions)? I know that  the old versions are 
> still there when you install a newer version. 
> 
> Has any of the other mac users had problems? 
> 
> Thanks,
> Marguerite
> 
> ____________________________________________
> Marguerite A. Butler
> Department of Zoology
> University of Hawaii
> 2538 McCarthy Mall, Edmondson 259
> Honolulu, HI  96822
> 
> Phone: 808-956-4713
> FAX:   808-956-9812
> Dept: 808-956-8617
> http://www2.hawaii.edu/~mbutler
> http://www.hawaii.edu/zoology/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Phylobase-devl mailing list
> Phylobase-devl at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl


More information about the Phylobase-devl mailing list