Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: package or namespace load failed for ‘chemhelper’ #9

Open
cuivienel opened this issue Apr 11, 2019 · 0 comments
Open

Error: package or namespace load failed for ‘chemhelper’ #9

cuivienel opened this issue Apr 11, 2019 · 0 comments

Comments

@cuivienel
Copy link

cuivienel commented Apr 11, 2019

Hi!
I recently installed your chemhelper package. I just ran a round of package updates and encountered the following error with the package:

Error: package or namespace load failed for ‘chemhelper’ in namespaceExport(ns, exports):
undefined exports: sim_covar, sim_df, sim_discr, sim_missing, sim_multvar
Error: loading failed
Execution halted

Any ideas what could be the reason?

Oh, and one more thing. I altered the plot_oplsda function a little bit to also include the RMSEE, pR² and pQ² values in the plot, and also to name the plot dynamically according to a list of names ("name_list"):

plotPLSDA <- function(ropls_plsda, annotate = c("caption", "subtitle")){
plotdata <- chemhelper::get_plotdata(ropls_plsda)
p <- ggplot(plotdata$scores, aes(x = p1, y = p2, color = y1)) +
geom_point() +
stat_ellipse() +
labs(x = paste0("P1 (", plotdata$axis_stats$R2X[1] * 100, "%)"),
y = paste0("P2 (", plotdata$axis_stats$R2X[2] * 100, "%)")) +
scale_color_discrete("Group Membership") +
theme_bw() +
labs(title = paste0("PLS-DA of ", name_list[i]," Samples"))
stats <- latex2exp::TeX(
paste0("$R^{2}{Y} = ", plotdata$model_stats$R2Y(cum), "$; ",
"$R^{2}
{X} = ", plotdata$model_stats$R2X(cum), "$; ",
"$Q^{2} = ", plotdata$model_stats$Q2(cum), "$; ",
"$RMSEE = ", plotdata$model_stats$RMSEE, "$; ",
"$p_{R^{2}} = ", plotdata$model_stats$pR2Y, "$; ",
"$p_{Q^{2}} = ", plotdata$model_stats$pQ2, "$"))

if (annotate == "caption"){
p + labs(caption = stats)
} else if(annotate == "subtitle"){
p + labs(subtitle = stats)
} else{
p
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant