statnet / statnet.common

Common R Scripts and Utilities Used by the Statnet Project Software
Other
8 stars 5 forks source link

Installation Error #29

Closed keithegiles closed 9 months ago

keithegiles commented 9 months ago

An error for statnet.common is thrown when trying to install the 'network' package into R 4.0.5. The error is pinpointed to this step:

[Connect] 2024/01/22 19:00:29.689159090   /opt/rstudio-connect/mnt/tmp/RtmpMXx8KV/packrat-install-c0c604c535153/statnet.common/R/matrix.utils.R:217:30: unexpected '>'
[Connect] 2024/01/22 19:00:29.689160152 216:   d <- diag(as.matrix(A))
[Connect] 2024/01/22 19:00:29.689171592 217:   d <- ifelse(d==0, 1, 1/d) |>

I was able to fix the issue by manually deleting the offending character and then installing the package manually. However, this is more difficult as I'm attempting to deploy the code to a server that I don't have access to do so.

krivit commented 9 months ago

Next release of statnet.common won't use that construct, but R 4.0.5 is almost 4 years old now.

keithegiles commented 9 months ago

I’m doing this at work, so it’s not trivial to actually update anything. Do you have any advice on how to get around this error? It pops when I try to install the package “network”Sent from my iPhoneOn Jan 22, 2024, at 9:03 PM, Pavel N. Krivitsky @.***> wrote: Next release of statnet.common won't use that construct, but 4.0.5 is almost 4 years old now.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

keithegiles commented 9 months ago

4.0.5 is the version of R..not the version of statnet.common Sent from my iPhoneOn Jan 23, 2024, at 9:58 AM, Keith Giles @.> wrote:I’m doing this at work, so it’s not trivial to actually update anything. Do you have any advice on how to get around this error? It pops when I try to install the package “network”Sent from my iPhoneOn Jan 22, 2024, at 9:03 PM, Pavel N. Krivitsky @.> wrote: Next release of statnet.common won't use that construct, but 4.0.5 is almost 4 years old now.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

krivit commented 9 months ago

Yes, I was referring to the version of R: I mean 3 years old, not 4. My apologies for the confusion.

  1. If you can compile packages, install.packages("remotes"); remotes::install_github("statnet/statnet.common") will install from this repository (which doesn't use |>).
  2. If your admin won't update R, you can download the source and compile a recent version in your user directory.
keithegiles commented 9 months ago

I did install 4.1.2 in my directory, but when I deploy the app it reverts.Do you know where apt-get would put the new R so I can change the R_HOME variable to point to it?I can’t find it Sent from my iPhoneOn Jan 23, 2024, at 5:49 PM, Pavel N. Krivitsky @.***> wrote: Yes, I was referring to the version of R: I mean 3 years old, not 4. My apologies for the confusion.

If you can compile packages, install.packages("remotes"); remotes::install_github("statnet/statnet.common") will install from this repository (which doesn't use |>). If your admin won't update R, you can download the source and compile a recent version in your user directory.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

krivit commented 9 months ago

Unfortunately, this depends on your specific IT setup, so I can't help you there. Have you tried asking your system administrator?

keithegiles commented 9 months ago

We got it sorted out. The issue was that the connect server was not running 4.1.2. Ugh. Sorry about all the bother.

On Thu, Jan 25, 2024 at 5:13 AM Pavel N. Krivitsky @.***> wrote:

Unfortunately, this depends on your specific IT setup, so I can't help you there. Have you tried asking your system administrator?

— Reply to this email directly, view it on GitHub https://github.com/statnet/statnet.common/issues/29#issuecomment-1909942778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJP7EY7O2TWKR2BWQ5SPC2DYQI45XAVCNFSM6AAAAABCFW3CZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZHE2DENZXHA . You are receiving this because you authored the thread.Message ID: @.***>