What about, since phylobase requires ape, importing the checkLabel function from ape and filtering all tip label through that function?<div><br></div><div>-conrad<br><br><div class="gmail_quote">On Thu, Aug 5, 2010 at 10:00 AM, Ben Bolker <span dir="ltr"><<a href="mailto:bolker@ufl.edu">bolker@ufl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">François Michonneau wrote:<br>
> Hi again Conrad,<br>
><br>
> In the file you sent me there were no state labels (just<br>
> charstatelabels), so the warning is normal.<br>
><br>
> For the underscore issue, there isn't much we can do about. NCL<br>
> converts underscores to spaces because there is no way to<br>
> differentiate them in newick strings for instance. Then when the name<br>
> is assigned to the column name in R, the space is converted to a dot.<br>
><br>
> Cheers,<br>
> -- François<br>
<br>
</div> If we wanted to we could (a) convert spaces back to underscores<br>
ourselves after NCL import (b) disable conversion of spaces to dots by<br>
using check.names=FALSE in the data.frame() call.<br>
<br>
I don't know whether either of these is useful in general, or if we<br>
just need to 'fix' this in the documentation.<br>
<br>
Opinions?<br>
<br>
Ben<br>
<div><div></div><div class="h5"><br>
><br>
> On Wed, Aug 4, 2010 at 22:31, Conrad Stack <<a href="mailto:stack@psu.edu">stack@psu.edu</a>> wrote:<br>
>> Looks great. Two things: it looks like the warning message about 'state<br>
>> labels' fires even when labels are found (only when DATATYPE=STANDARD) and,<br>
>> perhaps relatedly, underscores in CHARSTATELABELS are automatically<br>
>> converted to periods.<br>
>> Thanks!<br>
>> -Conrad<br>
>><br>
>><br>
>><br>
>> On Wed, Aug 4, 2010 at 12:53 PM, François Michonneau<br>
>> <<a href="mailto:francois.michonneau@gmail.com">francois.michonneau@gmail.com</a>> wrote:<br>
>>> Hi,<br>
>>><br>
>>> My last commit should fix the issue Conrad mentioned.<br>
>>><br>
>>> The problem came from the fact that the nexus file didn't have state<br>
>>> labels and the default option in readNexus was to return them. It<br>
>>> ended up attaching empty labels to the the 0 and 1 which resulted in<br>
>>> the empty column observed. I modified readNexus to (1) return a<br>
>>> warning when state labels are missing and return.labels is TRUE which<br>
>>> leads to ignoring the return.labels option.<br>
>>><br>
>>> Let me know if you find any other bugs.<br>
>>><br>
>>> Cheers,<br>
>>> -- François<br>
>>><br>
>>> On Tue, Aug 3, 2010 at 17:42, Conrad Stack <<a href="mailto:stack@psu.edu">stack@psu.edu</a>> wrote:<br>
>>>> I just upgraded to phylobase 0.6.1 and found that the data in my<br>
>>>> CHARACTERS<br>
>>>> blocks are no longer being read in (they show up as blanks in the<br>
>>>> returned<br>
>>>> phylo4d object).<br>
>>>> this is from the geospiza.nex dataset:<br>
>>>> BEGIN CHARACTERS;<br>
>>>> DIMENSIONS NCHAR=1;<br>
>>>> FORMAT DATATYPE = STANDARD GAP = - MISSING = ? SYMBOLS = " 0 1";<br>
>>>> MATRIX<br>
>>>> fuliginosa 1<br>
>>>> fortis 1<br>
>>>> magnirostris 0<br>
>>>> conirostris 0<br>
>>>> scandens 0<br>
>>>> difficilis 1<br>
>>>> pallida 0<br>
>>>> parvulus 0<br>
>>>> psittacula 0<br>
>>>> pauper 0<br>
>>>> Platyspiza 0<br>
>>>> fusca 0<br>
>>>> Pinaroloxias 0<br>
>>>> ;<br>
>>>> END;<br>
>>>> When it reads in, it shows up like this:<br>
>>>> readNexus("geospiza.nex")<br>
>>>> label node ancestor edge.length node.type standard_char<br>
>>>> 1 fuliginosa 1 22 0.05500 tip<br>
>>>> 2 fortis 2 22 0.05500 tip<br>
>>>> 3 magnirostris 3 21 0.11000 tip<br>
>>>> 4 conirostris 4 20 0.18333 tip<br>
>>>> 5 scandens 5 19 0.19250 tip<br>
>>>> 6 difficilis 6 18 0.22800 tip<br>
>>>> 7 pallida 7 23 0.08667 tip<br>
>>>> 8 parvulus 8 25 0.02000 tip<br>
>>>> 9 psittacula 9 25 0.02000 tip<br>
>>>> 10 pauper 10 24 0.03500 tip<br>
>>>> 11 Platyspiza 11 16 0.46550 tip<br>
>>>> 12 fusca 12 15 0.53409 tip<br>
>>>> 13 Pinaroloxias 13 14 0.58333 tip<br>
>>>> 14 <NA> 14 0 0.29744 root <NA><br>
>>>> 15 <NA> 15 14 0.04924 internal <NA><br>
>>>> 16 <NA> 16 15 0.06859 internal <NA><br>
>>>> .......cont....<br>
>>>> Any thoughts? (I'm using windows 7 32-bit with R 2.11, but the error<br>
>>>> occurs<br>
>>>> on my Mac leopard install as well.<br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Conrad Stack<br>
>>>> -----------------------<br>
>>>> PSU Department of Biology<br>
>>>> 208 Mueller Lab<br>
>>>> University Park, PA 16802<br>
>>>> cell: 814.409.8310<br>
>>>> email: <a href="mailto:conrad.stack@gmail.com">conrad.stack@gmail.com</a><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Phylobase-devl mailing list<br>
>>>> <a href="mailto:Phylobase-devl@lists.r-forge.r-project.org">Phylobase-devl@lists.r-forge.r-project.org</a><br>
>>>><br>
>>>> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl</a><br>
>>>><br>
>>>><br>
>><br>
>><br>
>> --<br>
>> Conrad Stack<br>
>> -----------------------<br>
>> PSU Department of Biology<br>
>> 208 Mueller Lab<br>
>> University Park, PA 16802<br>
>> cell: 814.409.8310<br>
>> email: <a href="mailto:conrad.stack@gmail.com">conrad.stack@gmail.com</a><br>
>><br>
> _______________________________________________<br>
> Phylobase-devl mailing list<br>
> <a href="mailto:Phylobase-devl@lists.r-forge.r-project.org">Phylobase-devl@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl</a><br>
<br>
<br>
--<br>
</div></div><font color="#888888">Ben Bolker<br>
*** NEW E-MAIL ADDRESSES:<br>
*** <a href="mailto:bbolker@gmail.com">bbolker@gmail.com</a> , <a href="mailto:bolker@mcmaster.ca">bolker@mcmaster.ca</a><br>
<a href="http://www.math.mcmaster.ca/~bolker" target="_blank">http://www.math.mcmaster.ca/~bolker</a><br>
GPG key: <a href="http://www.math.mcmaster.ca/~bolker/benbolker-publickey.asc" target="_blank">http://www.math.mcmaster.ca/~bolker/benbolker-publickey.asc</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Conrad Stack<br>-----------------------<br>PSU Department of Biology<br>208 Mueller Lab <br>University Park, PA 16802<br>cell: 814.409.8310<br>email: <a href="mailto:conrad.stack@gmail.com">conrad.stack@gmail.com</a><br>
</div>