Skip to content
New issue

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

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

Already on GitHub? # to your account

Problem installing fetchR #3

Closed
parsonsdm opened this issue Aug 9, 2015 · 11 comments
Closed

Problem installing fetchR #3

parsonsdm opened this issue Aug 9, 2015 · 11 comments

Comments

@parsonsdm
Copy link

Hi there,
I am not able to install fetchR using the install code provided.
I have pasted the point at which it falls over below. Any help would be greatly appreciated.
Cheers,
Darren

install_github(username = "blasee", repo = "fetchR")
Downloading github repo blasee/fetchR@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
In addition: Warning message:
Username parameter is deprecated. Please use blasee/fetchR

@blasee
Copy link
Owner

blasee commented Aug 9, 2015

Hi Darren,

Are you on a Windows machine? If so a similar problem was reported here which required options(download.file.method = "wininet") before the install_github. If on a Mac, you could try options(download.file.method = "libcurl") instead.

@parsonsdm
Copy link
Author

Hi Blake,
yes I am on a windows machine.
I tried your recommendation and realised that devtools required rtools.

options(download.file.method = "wininet")
library(devtools)
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 3.2 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
Warning message:
package ‘devtools’ was built under R version 3.1.3

So my next step was to find Rtools, but I get the following

find_rtools()
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 3.2 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
Warning: unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.1
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1

Consequently the fetchR install doesn't work

install_github("blasee/fetchR")
Downloading github repo blasee/fetchR@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached

Any help appreciated.
Cheers,
Darren

@blasee
Copy link
Owner

blasee commented Aug 10, 2015

Hi Darren,

I think this may be due to R (Rstudio?) not being able to find your Rtools installation. Here is a nice step-by-step guide for connecting Rtools with R. May I also suggest upgrading your R (and Rstudio?) to the most recent version and trying again - some of these bugs/issues may have been fixed in later versions.

Secondly, I believe the 'unable to access index for repository' warnings may be due to firewall/proxy issues. Assuming you're using Rstudio, try going to tools --> global options --> Packages and 'uncheck' the "Use Internet Explorer library/proxy for HTTP" option.

Hope this helps!

@parsonsdm
Copy link
Author

Hi Blake,
Thanks for your help with this. Wasn’t able to get it working, but that is probably due to a lack of persistence on my part.
Thanks again for your help,
Cheers,
Darren

@blasee
Copy link
Owner

blasee commented Aug 13, 2015

Hi Darren,

I still haven't been able to reproduce this issue but give this one last try:

  1. Download the .zip file to your computer straight from github (located here). Now you will be able to install the local zip file straight from R.
  2. Copy-paste into R: devtools::install_local(file.choose())
  3. Using the pop-up menu, navigate to the downloaded 'fetchR-master.zip' file.
  4. fetchR should now install on your system. When finished you can then type library(fetchR) to load the package.

This doesn't require internet connection from within R, which I think may have been the issue for you.

@blasee
Copy link
Owner

blasee commented Aug 16, 2015

Thanks for raising the issue Darren, I've updated the README to include alternative instructions if the automatic install doesn't work.

@blasee blasee closed this as completed Aug 16, 2015
@imarine85
Copy link

Hi Blasse,
I am quite new in R programming so sorry if my questions are too stupid. I am also trying to install the fetchR package in R and have similar problems. I tried to follow your recommendations but I did not succeed.
I am using R.3.3. in a Mac OS X Yosemite 10.10.5

######So when I enter this code:

options(download.file.method = "libcurl")
install.packages("fetchR")

I get:

"There is a binary version available but the source version is later:
binary source needs_compilation
fetchR 2.1-0 2.1-1 FALSE
installing the source package ‘fetchR’
trying URL 'https://cran.rstudio.com/src/contrib/fetchR_2.1-1.tar.gz'
Content type 'application/x-gzip' length 1354697 bytes (1.3 MB)

downloaded 1.3 MB

  • installing source package ‘fetchR’ ...
    ** package ‘fetchR’ successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
    there is no package called ‘XML’
    ERROR: lazy loading failed for package ‘fetchR’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/fetchR’
    Warning in install.packages :
    installation of package ‘fetchR’ had non-zero exit status

The downloaded source packages are in‘/private/var/folders/b1/xmvr7lmn5wl2zzxf6934py180000gn/T/Rtmpy1CfjJ/downloaded_packages’"

######So then I install package 'XML':

install.packages("XML")

######And the result was

There is a binary version available but the source version is later:
binary source needs_compilation
XML 3.98-1.9 3.98-1.16 TRUE

Do you want to install from sources the package which needs compilation?
y/n:

#####to which I responded n

n

####and result was:

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/XML_3.98-1.9.tgz'
Content type 'application/x-gzip' length 1891823 bytes (1.8 MB)

downloaded 1.8 MB

The downloaded binary packages are in
/var/folders/b1/xmvr7lmn5wl2zzxf6934py180000gn/T//Rtmpy1CfjJ/downloaded_packages

#####Then I tried to install fetchR package again..

install.packages("fetchR")

####But got the same result although now it tells me that package "aqp" is missing.
####I obtained the same results....(no fetchR package installation) even if I kept installing all the packages that are indicated every time.

###So I tried again following your last recommendation

I downloaded the fetchR.master zip.file and try

install.packages("devtools")

devtools::install_local(file.choose())

###but I am not sure which file should I have to choose from" the fetchR.master" folder. I seems to not actually work for any of the files.

Could you help me with that?

Thanks a lot,

I.

@blasee
Copy link
Owner

blasee commented Nov 5, 2018

Hi @imarine85,

If you use devtools::install_local(file.choose()), you want to navigate to the downloaded ZIP file.

What is the output you get if you type library(fetchR) into R? It seems to have downloaded the package successfully, so you may just need to load it into the R session.

@imarine85
Copy link

Hi blasse,

Thanks for your answer.
This is what I get:

devtools::install_local(file.choose())
Error in file.choose() : file choice cancelled
library(fetch)
Error in library(fetch) : there is no package called ‘fetch’

So it seems I should choose one of the files contained in the fetchR.master zip folder...(?)
Many thanks again,
I

@blasee
Copy link
Owner

blasee commented Nov 5, 2018

Hi @imarine85,

Can you please follow these steps, and let me know where you are getting stuck:

  1. Download RStudio. Choose to download the Mac OS X 10.6+ installer.
  2. Install RStudio by running the installer you have just downloaded.
  3. Once installed, open RStudio and navigate to the 'Packages' tab:
    rstudio
  4. Click on "Install":
    packages_tab
  5. Type "fetchR" into the Packages textbox, leave the other options as their default, and make sure you have the "Install dependencies" option checked:
    install_fetchr
  6. Click Install.
  7. You should see lines of red text, and if all was successful, you should see * DONE (fetchR) near the end of the output:
    installed
  8. If you see this, then you have successfully installed the latest stable version of fetchR. To load the package into your current session, type library(fetchR) into the console.
  9. To run an example, type example(fetch) into the console (press Enter to see the plots).

Does this work for you?

Thanks,
Blake

@imarine85
Copy link

imarine85 commented Nov 6, 2018 via email

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

No branches or pull requests

3 participants