New issue

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

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

Already on GitHub? Sign in to your account

getFX: Error in charToDate(x) #144

Closed
jvahl opened this Issue Apr 7, 2017 · 19 comments

Comments

Projects
None yet
@jvahl

jvahl commented Apr 7, 2017

library(quantmod)
getFX("EUR/USD")

Error in charToDate(x) :
character string is not in a standard unambiguous format

I'm running a code that used to work until this morning, I assume oanda has changed something on their side.

@jvahl jvahl changed the title from getFX stopped working to getFX: Error in charToDate(x) Apr 8, 2017

joshuaulrich added a commit that referenced this issue Apr 8, 2017

Update Oanda maximum date range
Not certain what the prior limits were, but now Oanda limits the number
of days of data returned per request to 180.

Update documentation and checks in getSymbols.oanda().

See #144.
@joshuaulrich

This comment has been minimized.

Show comment
Hide comment
@joshuaulrich

joshuaulrich Apr 8, 2017

Owner

Just pushed a couple commits that should address this issue. Please checkout and build the 144_getFX branch to see if everything works for you now. You should be able to do this with:

devtools::install_github("joshuaulrich/quantmod@144_getFX")

But note that you will need the necessary tools to build/compile C code from source.

Thanks for the report!

Owner

joshuaulrich commented Apr 8, 2017

Just pushed a couple commits that should address this issue. Please checkout and build the 144_getFX branch to see if everything works for you now. You should be able to do this with:

devtools::install_github("joshuaulrich/quantmod@144_getFX")

But note that you will need the necessary tools to build/compile C code from source.

Thanks for the report!

@joshuaulrich joshuaulrich self-assigned this Apr 8, 2017

@joshuaulrich joshuaulrich added the bug label Apr 8, 2017

@andrew521

This comment has been minimized.

Show comment
Hide comment
@andrew521

andrew521 Apr 9, 2017

It doesn't seem work for me.

> devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
"E:/tools/R/R-3.3.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "E:/Users/Sergiu/AppData/Local/Temp/Rtmp8KlRyP/devtools51a878eb1b08/joshuaulrich-quantmod-f17b925"  \
  --library="E:/tools/R/R-3.3.3/library" --install-tests 

* installing *source* package 'quantmod' ...
** libs
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c ohlcq.f -o ohlcq.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c ohlcz.f -o ohlcz.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c period.max.f -o period.max.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c period.sum.f -o period.sum.o
e:/tools/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -lgfortran -lm -lquadmath -LE:/tools/R/R-33~1.3/bin/x64 -lR
installing to E:/tools/R/R-3.3.3/library/quantmod/libs/x64
** R
** demo
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'lattice'
Error : package 'zoo' could not be loaded
ERROR: lazy loading failed for package 'quantmod'
* removing 'E:/tools/R/R-3.3.3/library/quantmod'
* restoring previous 'E:/tools/R/R-3.3.3/library/quantmod'
Error: Command failed (1)

andrew521 commented Apr 9, 2017

It doesn't seem work for me.

> devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
"E:/tools/R/R-3.3.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "E:/Users/Sergiu/AppData/Local/Temp/Rtmp8KlRyP/devtools51a878eb1b08/joshuaulrich-quantmod-f17b925"  \
  --library="E:/tools/R/R-3.3.3/library" --install-tests 

* installing *source* package 'quantmod' ...
** libs
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c ohlcq.f -o ohlcq.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c ohlcz.f -o ohlcz.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c period.max.f -o period.max.o
e:/tools/Rtools/mingw_64/bin/gfortran      -O2  -mtune=core2 -c period.sum.f -o period.sum.o
e:/tools/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -lgfortran -lm -lquadmath -LE:/tools/R/R-33~1.3/bin/x64 -lR
installing to E:/tools/R/R-3.3.3/library/quantmod/libs/x64
** R
** demo
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'lattice'
Error : package 'zoo' could not be loaded
ERROR: lazy loading failed for package 'quantmod'
* removing 'E:/tools/R/R-3.3.3/library/quantmod'
* restoring previous 'E:/tools/R/R-3.3.3/library/quantmod'
Error: Command failed (1)
@joshuaulrich

This comment has been minimized.

Show comment
Hide comment
@joshuaulrich

joshuaulrich Apr 9, 2017

Owner

@andrew521, that's not related to the patch. As the error says, the lattice package cannot be loaded. That means zoo, and therefore xts cannot be loaded. So the problem is with your local setup.

Owner

joshuaulrich commented Apr 9, 2017

@andrew521, that's not related to the patch. As the error says, the lattice package cannot be loaded. That means zoo, and therefore xts cannot be loaded. So the problem is with your local setup.

@andrew521

This comment has been minimized.

Show comment
Hide comment
@andrew521

andrew521 Apr 9, 2017

both xts and zoo load just fine.

library(zoo)
library(xts)
xt <- xts()
zt <- zoo()

any chance you can build a package?

andrew521 commented Apr 9, 2017

both xts and zoo load just fine.

library(zoo)
library(xts)
xt <- xts()
zt <- zoo()

any chance you can build a package?

@joshuaulrich

This comment has been minimized.

Show comment
Hide comment
@joshuaulrich

joshuaulrich Apr 9, 2017

Owner

both xts and zoo load just fine.

You show that they "load just fine" from some unspecified library. devtools::install_github is using "E:/tools/R/R-3.3.3/library". If lattice, zoo, and xts are not installed there, you won't be able to install quantmod there either.

any chance you can build a package?

No, I don't have a Windows machine available.

If you want to continue this discussion, please email me. I don't want to hijack this issue with a conversation about how to administer an R installation.


After some back-and-forth via email, we were able to determine that the issue was indeed an issue with @andrew521's lattice install.

Owner

joshuaulrich commented Apr 9, 2017

both xts and zoo load just fine.

You show that they "load just fine" from some unspecified library. devtools::install_github is using "E:/tools/R/R-3.3.3/library". If lattice, zoo, and xts are not installed there, you won't be able to install quantmod there either.

any chance you can build a package?

No, I don't have a Windows machine available.

If you want to continue this discussion, please email me. I don't want to hijack this issue with a conversation about how to administer an R installation.


After some back-and-forth via email, we were able to determine that the issue was indeed an issue with @andrew521's lattice install.

@joshuaulrich

This comment has been minimized.

Show comment
Hide comment
@joshuaulrich

joshuaulrich Apr 9, 2017

Owner

While testing, I noticed seems like only the past 180 days are available now. IIRC, you used to be able to request up to 500 days at a time, and you could get data back many years.

That suggests I need to change the documentation even more, and I should update the function so a warning is thrown if the user tries to request data before Sys.Date()-180.

Owner

joshuaulrich commented Apr 9, 2017

While testing, I noticed seems like only the past 180 days are available now. IIRC, you used to be able to request up to 500 days at a time, and you could get data back many years.

That suggests I need to change the documentation even more, and I should update the function so a warning is thrown if the user tries to request data before Sys.Date()-180.

@andrew521

This comment has been minimized.

Show comment
Hide comment
@andrew521

andrew521 Apr 9, 2017

Just to confirm that the patch works fine, on both Linux and Windows. As Joshua suggested, the build failure was due to a broken lattice package.

andrew521 commented Apr 9, 2017

Just to confirm that the patch works fine, on both Linux and Windows. As Joshua suggested, the build failure was due to a broken lattice package.

@gaborqbiznl

This comment has been minimized.

Show comment
Hide comment
@gaborqbiznl

gaborqbiznl Apr 10, 2017

Hi Joshua,

Will there be an update on the quantmod package related to this issue?

I tried to install the: devtools::install_github("joshuaulrich/quantmod@144_getFX") but it failed due to dependencies on: gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
I know this is not related to bug fix.

Have a nice day Joshua,
Gabor

gaborqbiznl commented Apr 10, 2017

Hi Joshua,

Will there be an update on the quantmod package related to this issue?

I tried to install the: devtools::install_github("joshuaulrich/quantmod@144_getFX") but it failed due to dependencies on: gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
I know this is not related to bug fix.

Have a nice day Joshua,
Gabor

@lukerm

This comment has been minimized.

Show comment
Hide comment
@lukerm

lukerm Apr 10, 2017

Like @gaborqbiznl, I'm also having difficulties updating fix #144 from source (as it is quite finicky to get right on Windows!). I'm currently working my way through the CRAN help guide on this, but I'm not sure if I'll be able to manage.

I don't know how often you make updates to CRAN, but if there is one coming soon (including the recent fix), it would be great to know about it :)

By the way, thanks for working so quickly to work out the fix. I think there are many of us who have come to rely on this package, and appreciate your efforts!

Cheers,
Luke

P.S. When trying to use the devtools::install_github command, as in your suggestion above, I get the following issue (hence trying to install from source):

from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
"C:/PROGRA~1/R/R-32~1.4RE/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/millerlu/AppData/Local/Temp/RtmpKsljzS/devtools25f459dd7693/joshuaulrich-quantmod-f17b925"  \
  --library="\\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2" --install-tests 

* installing *source* package 'quantmod' ...
** libs

*** arch - i386
gfortran -m32     -O3  -mtune=core2 -c ohlcq.f -o ohlcq.o
gfortran -m32     -O3  -mtune=core2 -c ohlcz.f -o ohlcz.o
gfortran -m32     -O3  -mtune=core2 -c period.max.f -o period.max.o
gfortran -m32     -O3  -mtune=core2 -c period.sum.f -o period.sum.o
gcc -m32 -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/RCompile/r-compiling/local/local323/lib/i386 -Ld:/RCompile/r-compiling/local/local323/lib -lgfortran -LC:/PROGRA~1/R/R-32~1.4RE/bin/i386 -lR
installing to \\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2/quantmod/libs/i386

*** arch - x64
gfortran -m64     -O2  -mtune=core2 -c ohlcq.f -o ohlcq.o
gfortran -m64     -O2  -mtune=core2 -c ohlcz.f -o ohlcz.o
gfortran -m64     -O2  -mtune=core2 -c period.max.f -o period.max.o
gfortran -m64     -O2  -mtune=core2 -c period.sum.f -o period.sum.o
gcc -m64 -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/RCompile/r-compiling/local/local323/lib/x64 -Ld:/RCompile/r-compiling/local/local323/lib -lgfortran -LC:/PROGRA~1/R/R-32~1.4RE/bin/x64 -lR
installing to \\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2/quantmod/libs/x64
** R
** demo
** preparing package for lazy loading
Warning: package 'xts' was built under R version 3.2.5
Warning: package 'zoo' was built under R version 3.2.5
Warning: package 'TTR' was built under R version 3.2.5
Creating a generic function for 'summary' from package 'base' in package 'quantmod'
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  there is no package called 'quantmod'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  there is no package called 'quantmod'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'

lukerm commented Apr 10, 2017

Like @gaborqbiznl, I'm also having difficulties updating fix #144 from source (as it is quite finicky to get right on Windows!). I'm currently working my way through the CRAN help guide on this, but I'm not sure if I'll be able to manage.

I don't know how often you make updates to CRAN, but if there is one coming soon (including the recent fix), it would be great to know about it :)

By the way, thanks for working so quickly to work out the fix. I think there are many of us who have come to rely on this package, and appreciate your efforts!

Cheers,
Luke

P.S. When trying to use the devtools::install_github command, as in your suggestion above, I get the following issue (hence trying to install from source):

from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
"C:/PROGRA~1/R/R-32~1.4RE/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/millerlu/AppData/Local/Temp/RtmpKsljzS/devtools25f459dd7693/joshuaulrich-quantmod-f17b925"  \
  --library="\\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2" --install-tests 

* installing *source* package 'quantmod' ...
** libs

*** arch - i386
gfortran -m32     -O3  -mtune=core2 -c ohlcq.f -o ohlcq.o
gfortran -m32     -O3  -mtune=core2 -c ohlcz.f -o ohlcz.o
gfortran -m32     -O3  -mtune=core2 -c period.max.f -o period.max.o
gfortran -m32     -O3  -mtune=core2 -c period.sum.f -o period.sum.o
gcc -m32 -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/RCompile/r-compiling/local/local323/lib/i386 -Ld:/RCompile/r-compiling/local/local323/lib -lgfortran -LC:/PROGRA~1/R/R-32~1.4RE/bin/i386 -lR
installing to \\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2/quantmod/libs/i386

*** arch - x64
gfortran -m64     -O2  -mtune=core2 -c ohlcq.f -o ohlcq.o
gfortran -m64     -O2  -mtune=core2 -c ohlcz.f -o ohlcz.o
gfortran -m64     -O2  -mtune=core2 -c period.max.f -o period.max.o
gfortran -m64     -O2  -mtune=core2 -c period.sum.f -o period.sum.o
gcc -m64 -shared -s -static-libgcc -o quantmod.dll tmp.def ohlcq.o ohlcz.o period.max.o period.sum.o -Ld:/RCompile/r-compiling/local/local323/lib/x64 -Ld:/RCompile/r-compiling/local/local323/lib -lgfortran -LC:/PROGRA~1/R/R-32~1.4RE/bin/x64 -lR
installing to \\gb....net/home/MillerLu/Profile/My Documents/R/win-library/3.2/quantmod/libs/x64
** R
** demo
** preparing package for lazy loading
Warning: package 'xts' was built under R version 3.2.5
Warning: package 'zoo' was built under R version 3.2.5
Warning: package 'TTR' was built under R version 3.2.5
Creating a generic function for 'summary' from package 'base' in package 'quantmod'
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  there is no package called 'quantmod'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  there is no package called 'quantmod'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
@wthielen

This comment has been minimized.

Show comment
Hide comment
@wthielen

wthielen Apr 10, 2017

Contributor

I haven't tried the #144 fix as I am on R 3.3.3 and for some reason it won't install devtools :( But I checked out the code of the 2 commits, and tried the widget=1 URL from the first commit, and it looks good. I can also confirm that the API only returns the latest 180 data points (I tried Jan 1st 2016 up to today, and it started with an April 9th 2017 timestamp, downwards.)
Sorry it isn't a real test, but hope this helps.

Contributor

wthielen commented Apr 10, 2017

I haven't tried the #144 fix as I am on R 3.3.3 and for some reason it won't install devtools :( But I checked out the code of the 2 commits, and tried the widget=1 URL from the first commit, and it looks good. I can also confirm that the API only returns the latest 180 data points (I tried Jan 1st 2016 up to today, and it started with an April 9th 2017 timestamp, downwards.)
Sorry it isn't a real test, but hope this helps.

joshuaulrich added a commit that referenced this issue Apr 10, 2017

Oanda only provides past 180 days
The previous commit assumed Oanda only provided 180 days per request,
but they actually only provide data for the past 180 days. No data will
be returned for dates prior to 180 days ago. Update the documentation
and warning accordingly.

Also remove old code used to request the minimum amount of data from
the Oanda servers, while still fulfilling the user's request.

See #144.

joshuaulrich added a commit that referenced this issue Apr 10, 2017

Oanda only provides past 180 days
The previous commit assumed Oanda only provided 180 days per request,
but they actually only provide data for the past 180 days. No data will
be returned for dates prior to 180 days ago. Update the documentation
and warning accordingly.

Also remove old code used to request the minimum amount of data from
the Oanda servers, while still fulfilling the user's request.

See #144.

@joshuaulrich joshuaulrich added this to the Release 0.4-8 milestone Apr 10, 2017

@northcob

This comment has been minimized.

Show comment
Hide comment
@northcob

northcob Apr 10, 2017

It worked for me.
Bill

northcob commented Apr 10, 2017

It worked for me.
Bill

@hlong77

This comment has been minimized.

Show comment
Hide comment
@hlong77

hlong77 Apr 11, 2017

Hi Joshua
I am getting this error when trying to run and install the patch:

devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
'/private/var/folders/cz/fc6t44kn6yl8xhb33ndsfd4w0000gn/T/RtmpTK1qLm/devtools124c954642147/joshuaulrich-quantmod-79f0e1d'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests

  • installing source package ‘quantmod’ ...
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
    make: gfortran-4.8: No such file or directory
    make: *** [ohlcq.o] Error 1
    ERROR: compilation failed for package ‘quantmod’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’

Do I need to compile it on RStudio?
Please can you tell me how to install that patch?
Thank you,
HL

hlong77 commented Apr 11, 2017

Hi Joshua
I am getting this error when trying to run and install the patch:

devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
'/private/var/folders/cz/fc6t44kn6yl8xhb33ndsfd4w0000gn/T/RtmpTK1qLm/devtools124c954642147/joshuaulrich-quantmod-79f0e1d'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests

  • installing source package ‘quantmod’ ...
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
    make: gfortran-4.8: No such file or directory
    make: *** [ohlcq.o] Error 1
    ERROR: compilation failed for package ‘quantmod’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’

Do I need to compile it on RStudio?
Please can you tell me how to install that patch?
Thank you,
HL

@braverock

This comment has been minimized.

Show comment
Hide comment
@braverock

braverock Apr 11, 2017

Collaborator

The error says that you don't have gfortran installed.

On Windows, that likely means you need to install the Rtools suite.

On a Mac, you'll need gfortran

Collaborator

braverock commented Apr 11, 2017

The error says that you don't have gfortran installed.

On Windows, that likely means you need to install the Rtools suite.

On a Mac, you'll need gfortran

@hlong77

This comment has been minimized.

Show comment
Hide comment
@hlong77

hlong77 Apr 11, 2017

Thanks Brian! (Y)

hlong77 commented Apr 11, 2017

Thanks Brian! (Y)

@gaborqbiznl

This comment has been minimized.

Show comment
Hide comment
@gaborqbiznl

gaborqbiznl Apr 11, 2017

Hi Brian,

Thanks for the tip! I installed the gfortran (Mac) from your link but still I receive this error:

`devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD
INSTALL
'/private/var/folders/sg/9rth37wj2gz_qf70dvzc2d3r0000gn/T/Rtmpre6ree/devtools1d74336ef13/joshuaulrich-quantmod-79f0e1d'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests

  • installing source package ‘quantmod’ ...
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
    make: gfortran-4.8: No such file or directory
    make: *** [ohlcq.o] Error 1
    ERROR: compilation failed for package ‘quantmod’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
    Error: Command failed (1)

`

What could be still the issue? I have updated R and RStudio.

And thank you both Joshua and Brian for helping out with this change on Oanda's end.

gaborqbiznl commented Apr 11, 2017

Hi Brian,

Thanks for the tip! I installed the gfortran (Mac) from your link but still I receive this error:

`devtools::install_github("joshuaulrich/quantmod@144_getFX")
Downloading GitHub repo joshuaulrich/quantmod@144_getFX
from URL https://api.github.com/repos/joshuaulrich/quantmod/zipball/144_getFX
Installing quantmod
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD
INSTALL
'/private/var/folders/sg/9rth37wj2gz_qf70dvzc2d3r0000gn/T/Rtmpre6ree/devtools1d74336ef13/joshuaulrich-quantmod-79f0e1d'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests

  • installing source package ‘quantmod’ ...
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c ohlcq.f -o ohlcq.o
    make: gfortran-4.8: No such file or directory
    make: *** [ohlcq.o] Error 1
    ERROR: compilation failed for package ‘quantmod’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantmod’
    Error: Command failed (1)

`

What could be still the issue? I have updated R and RStudio.

And thank you both Joshua and Brian for helping out with this change on Oanda's end.

@braverock

This comment has been minimized.

Show comment
Hide comment
@braverock

braverock Apr 11, 2017

Collaborator

See instructions here for things like setting the path, which is probably what you missed.

Collaborator

braverock commented Apr 11, 2017

See instructions here for things like setting the path, which is probably what you missed.

@gaborqbiznl

This comment has been minimized.

Show comment
Hide comment
@gaborqbiznl

gaborqbiznl Apr 11, 2017

Thanks Brian!

I had to use this because the gfortran 4-8 didn't appear in the right folder on MacOS Sierra (10.12.3): http://stackoverflow.com/questions/23916219/os-x-package-installation-depends-on-gfortran-4-8

This code helped:

curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /

Thank you again for the quick help, it works now.

gaborqbiznl commented Apr 11, 2017

Thanks Brian!

I had to use this because the gfortran 4-8 didn't appear in the right folder on MacOS Sierra (10.12.3): http://stackoverflow.com/questions/23916219/os-x-package-installation-depends-on-gfortran-4-8

This code helped:

curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /

Thank you again for the quick help, it works now.

@dmeloso

This comment has been minimized.

Show comment
Hide comment
@dmeloso

dmeloso Apr 13, 2017

Thank you for the fix! Worked like a charm for me (I entered issue #148)

dmeloso commented Apr 13, 2017

Thank you for the fix! Worked like a charm for me (I entered issue #148)

@jeremyaperson

This comment has been minimized.

Show comment
Hide comment
@jeremyaperson

jeremyaperson Apr 21, 2017

thanks for the fix.

jeremyaperson commented Apr 21, 2017

thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment