davidsjoberg / ggsankey

Make sankey, alluvial and sankey bump plots in ggplot
Other
262 stars 30 forks source link

can't install ggsankey #42

Closed marazzoli closed 1 year ago

marazzoli commented 1 year ago

Hello, I tried installing ggsankey using "remote", "devtools" and locally and everything failed, with the same warning message: "Installing package into ‘C:/...../R/win-library/4.2’ (as ‘lib’ is unspecified) Warning message: package 'ggplot2' was built under R version 4.2.3 Error in subset(..., ...== "....") : object ...' not found Calls: ggplot -> subset Execution halted Warning message: In i.p(...) : installation of package ‘C:/....../ggsankey-main’ had non-zero exit status"

It does seem like I'm having an issue with ggplot2, but I cleared the environment, restarted R studio, removed and reinstalled ggplot2, made sure all is up to date.... I am sure I'm missing something fundamental, but I hope that you can help me find out. Thanks in advance Maria

engineerchange commented 1 year ago

Hi @marazzoli: I'm having trouble grokking this error. Could you do a reprex so the output error messages are clear?

marazzoli commented 1 year ago

@engineerchange thanks for your reply. I believe that due to the grammar of the error message I get, reprex doens't work (it actually gives an error message itself). Here's what I've got (as copy paste in this space):

devtools::install_github("davidsjoberg/ggsankey") Downloading GitHub repo davidsjoberg/ggsankey@HEAD ── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ checking for file 'C:\Users...\AppData\Local\Temp\RtmpAdEpG3\remotes707442c263f7\davidsjoberg-ggsankey-3e171a8/DESCRIPTION' ─ preparing 'ggsankey': ✔ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories Omitted 'LazyData' from DESCRIPTION ─ building 'ggsankey_0.0.99999.tar.gz'

Installing package into ‘C:/Users/..../AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) Warning message: package 'ggplot2' was built under R version 4.2.3 Error in subset(muscle_liver, tissue == "liver") : object 'muscle_liver' not found Calls: ggplot -> subset Execution halted Warning message: In i.p(...) : installation of package ‘C:/Users/maria/AppData/Local/Temp/RtmpAdEpG3/file707471266e30/ggsankey_0.0.99999.tar.gz’ had non-zero exit status

engineerchange commented 1 year ago

@marazzoli I'm mostly confused by the error subset(muscle_liver, tissue == "liver") - are you running a line of code above this that doesn't end?

Can you click Session -> Restart R and only run devtools::install_github("davidsjoberg/ggsankey") after startup in the Console?

marazzoli commented 1 year ago

@engineerchange sorry for the confusion.....that code is smtg that got compromised and I don't seem to be able to get rid of it. IT appears anytime I restart R studio. I know that's got to be the key, but I honestly can't find a way to get rid of it, short of uninstalling R and Rstudio and trying again...... This btw is what it looks like restarting a session after closing and reopening Rstudio

Restarting R session...

Warning message: package ‘ggplot2’ was built under R version 4.2.3 Error in subset(muscle_liver, tissue == "liver") : object 'muscle_liver' not found

engineerchange commented 1 year ago

@marazzoli sounds like a startup script is impacting your R session. Look into .Rprofile or .Renviron files, and then comment out the script so you can install packages before loading packages when you restart your R session. Here's a helper page to find where those files are located on your machine.

marazzoli commented 1 year ago

thank you!!!! I managed to find the startup script and now I installed and m ready to enjoy ggsankey! thank you so much

engineerchange commented 1 year ago

@marazzoli excellent, glad to hear it is resolved! Please don't forget to "close issue" below.

marazzoli commented 1 year ago

thank you again! issue resolved!