Dear all
I meet a very strange problem that I have the following coding which runs normally in Rstudio,
p <- plot_ly(
data = pca.df,
x =~pca.df[,paste0('Axis',sel.xaxis)],
y = ~pca.df[,paste0('Axis',sel.yaxis)],
mode = "markers",
color = ~popnames,
marker= ~list(size=8,color=color),
text=~paste0('Ind. name= ',ind.names,"\n ,Pop:", popnames)
But error appears when I open the URL link as following: error:unique() applies only to vectors
If I change the above code to : (delete the symbol ~
)
p <- plot_ly(
data = pca.df,
x =pca.df[,paste0('Axis',sel.xaxis)],
y = pca.df[,paste0('Axis',sel.yaxis)],
mode = "markers",
color = popnames,
marker=list(size=8,color=color),
text=paste0('Ind. name= ',ind.names,"\n ,Pop:", popnames))
It runs normally in URL link instead, but error appears when runs in Rstudio like following: error: object color not find
.
I have no idea about it. May I ask if any of you know how to solve it?
Thank you in advance