blasee / fetchR

Calculate Wind Fetch in R
4 stars 3 forks source link

Problem installing fetchR #3

Closed parsonsdm closed 9 years ago

parsonsdm commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

imarine85 commented 5 years ago

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

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Hi Blake, Thanks a lot for your answer....But not, it does not work:

This is what I get:

install.packages("fetchR")

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

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

library(fetchR) Error in library(fetchR) : there is no package called ‘fetchR’

how come??!!!😥

Inés

El mar., 6 nov. 2018 a las 7:40, Blake Seers (notifications@github.com) escribió:

Hi @imarine85 https://github.com/imarine85,

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

  1. Download RStudio https://www.rstudio.com/products/rstudio/download/#download. 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: [image: rstudio] https://user-images.githubusercontent.com/5362994/48033051-a8649500-e1be-11e8-9505-035eda7e7ec8.png
  4. Click on "Install": [image: packages_tab] https://user-images.githubusercontent.com/5362994/48033229-5ff9a700-e1bf-11e8-9635-7c0ea27aacb5.png
  5. Type "fetchR" into the Packages textbox, leave the other options as their default, and make sure you have the "Install dependencies" option checked: [image: install_fetchr] https://user-images.githubusercontent.com/5362994/48033313-bff04d80-e1bf-11e8-815b-e5c209769c59.png
  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: [image: installed] https://user-images.githubusercontent.com/5362994/48033440-2a08f280-e1c0-11e8-83bb-350362f50820.png
  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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/blasee/fetchR/issues/3#issuecomment-436077254, or mute the thread https://github.com/notifications/unsubscribe-auth/AqsCZR-STcHOfbnR4tZzR_h-W8Ap30YVks5usMxQgaJpZM4FoTnb .