On 2025-07-03 6:32 p.m., Sharon Bewick wrote:
The problem is that the function that ape exports is way too slow. Using
C directly really sped up my program, which is a bit slow even at that…
You need to be collaborating with the ape maintainer to fix that package
so it works for your problem. Most package maintainers are happy to
accept suggested improvements.
Duncan Murdoch
*From: *Duncan Murdoch <murdoch.dun...@gmail.com>
*Date: *Thursday, July 3, 2025 at 4:13 PM
*To: *Sharon Bewick <sbew...@clemson.edu>, r-package-devel@r-project.org
<r-package-devel@r-project.org>
*Subject: *Re: [R-pkg-devel] Two errors
This Message Is From An External Sender: Use caution when opening links
or attachments if you do not recognize the sender.
On 2025-07-03 5:57 p.m., Sharon Bewick wrote:
1. I�m trying to upload my R package. However, I use the ape function
seq_root2tip but for the sake of speed am calling it using .Call:
toroot<-.Call(seq_root2tip, nt$edge, length(nt$tip.label), nt$Nnode)
How do I get R to recognize the seq_root2tip function from ape in this C call?
It is throwing up a NOTE that is getting my package rejected:
shade_branch: no visible binding for global variable �seq_root2tip�
If ape doesn't export seq_root2tip, then you shouldn't use it. Use
whatever function ape exported.
but seq_root2tip is a function, not a global variable.
In R, most functions are objects, there isn't really a distinction
between variables and functions.
2. I�m also getting a NOTE about: no visible global function definition for
�phy_tree<-�
I have declared phy_tree in the NAMESPACE file: importFrom(phyloseq,phy_tree)
I don�t know what the problem is�
"phy_tree" and "phy_tree<-" are two different functions. Import both of
them (if both are exported).
Duncan Murdoch
Thanks!
Sharon
[[alternative HTML version deleted]]
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
<https://stat.ethz.ch/mailman/listinfo/r-package-devel>
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel