1. all functions in R are variables. You can "trick" code tools by writing
seq_root2tip=NULL in the same scope but consider (a) C routines are
typically part of a package's private interface (b) it might be preferable
to use the string "seq_root2tip" with PACKAGE="ape"

2. phytree is not the same as phytree<- : importFrom(phyloseq, "phytree<-")
is what you want assuming it's exported)

(c.f. `x = phyteee(...)` vs. `phytree(x) <- ...`)

Mike C

On Thu, Jul 3, 2025, 2:57 PM Sharon Bewick <sbew...@clemson.edu> 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’
>
> but seq_root2tip is a function, not a global variable.
>
> 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…
>
> Thanks!
> Sharon
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to