jinyizju/S.PhyloMaker

unused argument (splist = mylist)

Opened this issue · 6 comments

Hi Jinyi,

I tried to build the tree with S.Phylomaker, however it returns this error message:
Error in S.PhyloMaker(splist = mylist, tree = phylo, nodes = nodes) :
unused argument (splist = mylist)

My full commands are just like the examples:
mylist<-read.csv("cnphmLIST.csv",header=T)
phylo<-read.tree("phytophylo.tre")
nodes<-read.csv("nodes.csv",header=T)
result<-S.PhyloMaker(splist=mylist,tree=phylo,nodes=nodes)

Any ideal?
Thank you

Hi visamilar,

There is a typo in the example code. The argument that S.PhyloMaker needs is spList = ..., with a capital L. You've probably resolved this issue already, but for others who haven't, it's easy to fix.

Sam

Thanks for answering this, Sam! My apologies, visamilar. I just notice this message.

Hi Jinyi
I have new error popped up, it says

Error: $ operator is invalid for atomic vectors

any ideal?

Hello visamilar,

The Error you shown indicates that there is an atomic vector from which you were trying to indexing an object. Since $ does not apply to an atomic vector in R, the error popped up.

More information is needed to intrepret why the error happened.

Yi

Hi Yi
This is all the script I use, it seems all same as your example.

library(ape)
library(maps)
library(phytools)
setwd("~/Desktop")

mylist<-read.csv("cnphmLIST.csv",header=T)
phylo<-read.tree("phytophylo.tre")
nodes<-read.csv("nodes.csv",header=T)
result<-S.PhyloMaker(spList=mylist,tree=phylo,nodes=nodes)
str(result)
plot(result)

Cheers
Di

Hello visamilar,

Maybe you could try your run again with the new version of S.PhyloMaker I just uploaded. If it still does not work, you could show me some rows of your species list if you want.

cheers,

Yi