leifeld / dna

Discourse Network Analyzer (DNA)
124 stars 41 forks source link

Installation problem #142

Closed FarisDz closed 5 years ago

FarisDz commented 5 years ago

I had no experiences with Rstudio before. So, I don't understand this error message during DNA installation, I had finish this step install.packages("devtools"), then proceed to devtools::install_github("leifeld/dna/rDNA", args = "--no-multiarch"). But always end with this messages: Downloading GitHub repo leifeld/dna@master Error in utils::download.file(url, path, method = download_method(), quiet = quiet, : cannot open URL 'https://api.github.com/repos/leifeld/dna/tarball/master'

JBGruber commented 5 years ago

This looks like you are not having a working internet connection or GitHub was down when you tried this (GitHub actually had some problems on 2. November). Can you try again now and see if the error persists? If so, could you run the following command in R:

readLines("https://raw.githubusercontent.com/leifeld/dna/master/README.md")

This will simply try to read a text file from our repository. If R can connect to the internet you should see the source code of the README. You can also try to install another package using install.packages(). If you continue to get errors, R is unable to connect to the internet. In this case, you might need to change your firewall settings etc.

FarisDz commented 5 years ago

Thanks for the reply. I can read the text. But still can't download the package, perhaps due my bad internet connection. By the way I had try install.packages() on RGui, and the install command from 'packages' menu, but I couldn't find rdna package from CRAN repository or the others.

JBGruber commented 5 years ago

rDNA is not available on CRAN at the moment. What you could try is to download the newest release first and then install from this file.

You would need to make sure all dependencies are installed first:

dependencies <- c("rJava", "cluster", "coda", "cowplot", "dplyr", "ggforce", "ggplot2", "ggraph", "ggrepel", "grDevices", "MASS", "MCMCpack", "network", "reshape2", "rem", "scales", "sna", "splitstackshape", "stats", "utils", "vegan", "igraph", "parallel")

for (package in dependencies) {
  if (!require(package, character.only = TRUE)) {
    install.packages(eval(package))
  }
}

This will check if a package is installed and install it if it's not. Then you can install rDNA from the downloaded file using:

install.packages("C:/Users/2152311G/Downloads/rDNA_2.1.9.tar.gz", repos = NULL, type="source", args = "--no-multiarch")

MarleneKammerer commented 5 years ago

Dear DNA People, I am encountering an installation problem, too. I did everything in the way you have described it in the manual and I have also tried the 2nd option (that you describe just above) using the downloaded file to install rDNA. Neither of the two options work.

I've also tried re-installing Java and R: If I check for the Java version I get the following:

.jinit() [1] 0 .jcall("java/lang/System", "S", "getProperty", "java.version") [1] "1.8.0_181" .jcall("java/lang/System", "S", "getProperty", "java.home") [1] "C:\Program Files\Java\jre1.8.0_181"

If I continue to run the commands as shown in your manual I get the following error message:

Error: package or namespace load failed for 'rJava': .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. Error : package 'rJava' could not be loaded Fehler: Laden fehlgeschlagen Ausführung angehalten *** arch - x64 ERROR: loading failed for 'i386' removing 'C:/Program Files/R/R-3.5.1/library/rDNA' In R CMD INSTALL Error in i.p(...) : (converted from warning) installation of package ‘C:/Users/kammerer/AppData/Local/Temp/RtmpgrlDz1/file215818066101/rDNA_2.1.9.tar.gz’ had non-zero exit status

Many thanks for your help!! Marlene

JBGruber commented 5 years ago

This looks like you forgot the argument args = "--no-multiarch" in the installation command :)

If you used the correct installation command (devtools::install_github("leifeld/dna/rDNA", args = "--no-multiarch")) then could please provide us some more information (all commands in R, rJava must be loaded):

  1. sessionInfo()
  2. .jinit();.jcall("java/lang/System", "S", "getProperty", "sun.arch.data.model");.jcall("java/lang/System", "S", "getProperty", "os.arch");R.Version()$arch
  3. The full output from the failed installation

thanks

MarleneKammerer commented 5 years ago

HI Thanks for this super quick response. I think I haven’t forgotten the argument. But, it would be great if it was that easy ;-).

This is the code; Please find the output protocol attached

Set up

Install Java and retrieve Java version

install.packages("rJava") library (rJava)

.jinit() .jcall("java/lang/System", "S", "getProperty", "java.version") .jcall("java/lang/System", "S", "getProperty", "java.home") .jcall("java/lang/System", "S", "getProperty", "os.arch") # java, Os and R architecture must match. In my case it is 64; amd 64 and x86_64 .jcall("java/lang/System", "S", "getProperty", "sun.arch.data.model")

R.Version()$arch

Install devtools

install.packages("devtools") devtools::install_github("leifeld/dna/rDNA", args = "--no-multiarch") # download rdNA from github

Many thanks again Marlene

Universität Bern Oeschger Centre for Climate Research (OCCR) Institut für Politikwissenschaft (IPW)

Marlene Kammerer Post-Doc, Dr. phil

Fabrikstrasse 8 CH-3012 Bern

Tel. +41 (0)31 631 48 22 mailto: marlene.kammerer@ipw.unibe.ch

http://www.kammerer_marlene.unibe.chhttp://www.kammerer_marlene.unibe.ch/ http://www.oeschger.unibe.ch/about_us/people/personalpage/index_eng.html?id=558

Recent papers: Kammerer, Marlene & Namhata, Chandreyee 2018: What drives the Adoption of Climate Change Mitigation Policy? A Dynamic Network Approach to Policy Diffusion, Policy Sciences, Online First, 10.1007/s11077-018-9332-6

Von: Johannes Gruber notifications@github.com Gesendet: Dienstag, 6. November 2018 14:23 An: leifeld/dna dna@noreply.github.com Cc: Kammerer, Marlene (IPW) marlene.kammerer@ipw.unibe.ch; Comment comment@noreply.github.com Betreff: Re: [leifeld/dna] Installation problem (#142)

This looks like you forgot the argument args = "--no-multiarch" in the installation command :)

If you used the correct installation command (devtools::install_github("leifeld/dna/rDNA", args = "--no-multiarch")) then could please provide us some more information (all commands in R, rJava must be loaded):

  1. sessionInfo()
  2. .jinit();.jcall("java/lang/System", "S", "getProperty", "sun.arch.data.model");.jcall("java/lang/System", "S", "getProperty", "os.arch");R.Version()$arch
  3. The full output from the failed installation

thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/leifeld/dna/issues/142#issuecomment-436250542, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aqumat9oRSJPmUDvJtOs9bQLn5SUBsQvks5usY0ngaJpZM4YNLMy.

install.packages("rJava") trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rJava_0.9-10.zip' Content type 'application/zip' length 826966 bytes (807 KB) downloaded 807 KB

package ‘rJava’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\kammerer\AppData\Local\Temp\RtmpamuiKP\downloaded_packages

library (rJava) .jinit() .jcall("java/lang/System", "S", "getProperty", "java.version") [1] "1.8.0_181" .jcall("java/lang/System", "S", "getProperty", "java.home") [1] "C:\Program Files\Java\jre1.8.0_181" .jcall("java/lang/System", "S", "getProperty", "os.arch") # java, Os and R architecture must match. In my case it is 64; amd 64 and x86_64 [1] "amd64" .jcall("java/lang/System", "S", "getProperty", "sun.arch.data.model") [1] "64" R.Version()$arch [1] "x86_64" install.packages("devtools") trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/devtools_2.0.1.zip' Content type 'application/zip' length 384930 bytes (375 KB) downloaded 375 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\kammerer\AppData\Local\Temp\RtmpamuiKP\downloaded_packages

devtools::install_github("leifeld/dna/rDNA", args = "--no-multiarch") # download rdNA from github Downloading GitHub repo leifeld/dna@master √ checking for file 'C:\Users\kammerer\AppData\Local\Temp\RtmpamuiKP\remotes3618636e64a0\leifeld-dna-8b51c46\rDNA/DESCRIPTION' ...

  • preparing 'rDNA': √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'rDNA_2.1.9.tar.gz'
JBGruber commented 5 years ago

So apparently the args argument was removed in the new version of devtools (see) which is why "--no-multiarch" is suddenly ignored. The new syntax should be:

devtools::install_github("leifeld/dna/rDNA", INSTALL_opts = "--no-multiarch")

@MarleneKammerer can you check if that works for you? I will test if this is compatible with older versions of devtools (which I think it is) and then change it in the README and manual.

MarleneKammerer commented 5 years ago

YES It worked. That’s awesome. Thank you for you quick help! Best, Marlene

Universität Bern Oeschger Centre for Climate Research (OCCR) Institut für Politikwissenschaft (IPW)

Marlene Kammerer Post-Doc, Dr. phil

Fabrikstrasse 8 CH-3012 Bern

Tel. +41 (0)31 631 48 22 mailto: marlene.kammerer@ipw.unibe.ch

http://www.kammerer_marlene.unibe.chhttp://www.kammerer_marlene.unibe.ch/ http://www.oeschger.unibe.ch/about_us/people/personalpage/index_eng.html?id=558

Recent papers: Kammerer, Marlene & Namhata, Chandreyee 2018: What drives the Adoption of Climate Change Mitigation Policy? A Dynamic Network Approach to Policy Diffusion, Policy Sciences, Online First, 10.1007/s11077-018-9332-6

Von: Johannes Gruber notifications@github.com Gesendet: Mittwoch, 7. November 2018 00:35 An: leifeld/dna dna@noreply.github.com Cc: Kammerer, Marlene (IPW) marlene.kammerer@ipw.unibe.ch; Mention mention@noreply.github.com Betreff: Re: [leifeld/dna] Installation problem (#142)

So apparently the args argument was removed in the new version of devtools (seehttps://cran.r-project.org/web/packages/devtools/news/news.html) which is why "--no-multiarch" is suddenly ignored. The new syntax should be:

devtools::install_github("leifeld/dna/rDNA", INSTALL_opts = "--no-multiarch")

@MarleneKammererhttps://github.com/MarleneKammerer can you check if that works for you? I will test if this is compatible with older versions of devtools (which I think it is) and then change it in the README and manual.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/leifeld/dna/issues/142#issuecomment-436448842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AqumauvsET3TXuPvMIpjf6F6WAmEbxojks5ushy7gaJpZM4YNLMy.

MarleneKammerer commented 5 years ago

Dear Johannes, dear Philip

Sorry to bother you again. Although the installation worked well now, I run into problems opening the dna data base. When I run the command

conn <- dna_connection("Level3_CH_2017.dna")

R starts to do something, but never stops. I also tried loading the sample data set delivered within the package with conn <- dna_connection(dna_sample()), but the same thing happens.

Thanks in advance for your help.

Best Marlene

Universität Bern Oeschger Centre for Climate Research (OCCR) Institut für Politikwissenschaft (IPW)

Marlene Kammerer Post-Doc, Dr. phil

Fabrikstrasse 8 CH-3012 Bern

Tel. +41 (0)31 631 48 22 mailto: marlene.kammerer@ipw.unibe.ch

http://www.kammerer_marlene.unibe.chhttp://www.kammerer_marlene.unibe.ch/ http://www.oeschger.unibe.ch/about_us/people/personalpage/index_eng.html?id=558

Recent papers: Kammerer, Marlene & Namhata, Chandreyee 2018: What drives the Adoption of Climate Change Mitigation Policy? A Dynamic Network Approach to Policy Diffusion, Policy Sciences, Online First, 10.1007/s11077-018-9332-6

Von: Johannes Gruber notifications@github.com Gesendet: Mittwoch, 7. November 2018 00:35 An: leifeld/dna dna@noreply.github.com Cc: Kammerer, Marlene (IPW) marlene.kammerer@ipw.unibe.ch; Mention mention@noreply.github.com Betreff: Re: [leifeld/dna] Installation problem (#142)

So apparently the args argument was removed in the new version of devtools (seehttps://cran.r-project.org/web/packages/devtools/news/news.html) which is why "--no-multiarch" is suddenly ignored. The new syntax should be:

devtools::install_github("leifeld/dna/rDNA", INSTALL_opts = "--no-multiarch")

@MarleneKammererhttps://github.com/MarleneKammerer can you check if that works for you? I will test if this is compatible with older versions of devtools (which I think it is) and then change it in the README and manual.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/leifeld/dna/issues/142#issuecomment-436448842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AqumauvsET3TXuPvMIpjf6F6WAmEbxojks5ushy7gaJpZM4YNLMy.

MarleneKammerer commented 5 years ago

Just to let you know. R ran for at least an hour (unfortunately I did not stop the time), but eventually the data set was loaded into R. Best Marlene

Universität Bern Oeschger Centre for Climate Research (OCCR) Institut für Politikwissenschaft (IPW)

Marlene Kammerer Post-Doc, Dr. phil

Fabrikstrasse 8 CH-3012 Bern

Tel. +41 (0)31 631 48 22 mailto: marlene.kammerer@ipw.unibe.ch

http://www.kammerer_marlene.unibe.chhttp://www.kammerer_marlene.unibe.ch/ http://www.oeschger.unibe.ch/about_us/people/personalpage/index_eng.html?id=558

Recent papers: Kammerer, Marlene & Namhata, Chandreyee 2018: What drives the Adoption of Climate Change Mitigation Policy? A Dynamic Network Approach to Policy Diffusion, Policy Sciences, Online First, 10.1007/s11077-018-9332-6

Von: Kammerer, Marlene (IPW) Gesendet: Freitag, 9. November 2018 15:16 An: 'leifeld/dna' reply@reply.github.com Betreff: AW: [leifeld/dna] Installation problem (#142)

Dear Johannes, dear Philip

Sorry to bother you again. Although the installation worked well now, I run into problems opening the dna data base. When I run the command

conn <- dna_connection("Level3_CH_2017.dna")

R starts to do something, but never stops. I also tried loading the sample data set delivered within the package with conn <- dna_connection(dna_sample()), but the same thing happens.

Thanks in advance for your help.

Best Marlene

Universität Bern Oeschger Centre for Climate Research (OCCR) Institut für Politikwissenschaft (IPW)

Marlene Kammerer Post-Doc, Dr. phil

Fabrikstrasse 8 CH-3012 Bern Tel. +41 (0)31 631 48 22 mailto: marlene.kammerer@ipw.unibe.chmailto:marlene.kammerer@ipw.unibe.ch http://www.kammerer_marlene.unibe.chhttp://www.kammerer_marlene.unibe.ch/ http://www.oeschger.unibe.ch/about_us/people/personalpage/index_eng.html?id=558

Recent papers: Kammerer, Marlene & Namhata, Chandreyee 2018: What drives the Adoption of Climate Change Mitigation Policy? A Dynamic Network Approach to Policy Diffusion, Policy Sciences, Online First, 10.1007/s11077-018-9332-6

Von: Johannes Gruber notifications@github.com<mailto:notifications@github.com> Gesendet: Mittwoch, 7. November 2018 00:35 An: leifeld/dna dna@noreply.github.com<mailto:dna@noreply.github.com> Cc: Kammerer, Marlene (IPW) marlene.kammerer@ipw.unibe.ch<mailto:marlene.kammerer@ipw.unibe.ch>; Mention mention@noreply.github.com<mailto:mention@noreply.github.com> Betreff: Re: [leifeld/dna] Installation problem (#142)

So apparently the args argument was removed in the new version of devtools (seehttps://cran.r-project.org/web/packages/devtools/news/news.html) which is why "--no-multiarch" is suddenly ignored. The new syntax should be:

devtools::install_github("leifeld/dna/rDNA", INSTALL_opts = "--no-multiarch")

@MarleneKammererhttps://github.com/MarleneKammerer can you check if that works for you? I will test if this is compatible with older versions of devtools (which I think it is) and then change it in the README and manual.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/leifeld/dna/issues/142#issuecomment-436448842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AqumauvsET3TXuPvMIpjf6F6WAmEbxojks5ushy7gaJpZM4YNLMy.

JBGruber commented 5 years ago

@MarleneKammerer that is odd and I have no idea why that would happen. I tried to investigate but I just can't reproduce the problem.

Could you please open a new issue though? It is quite different from the original question at this point.

Could you also please post all commands you run from the point you open up R until the issue occurs? Also the output from sessionInfo(). Please [format this as code](sessionInfo()) which makes the output much easier to read for us.