[R-SIG-Finance] saveChart don't work in Quantmod package

Jeff Ryan jeff.a.ryan at gmail.com
Thu Apr 18 18:02:37 CEST 2013


Yes. This is a bug. Newest R and quantmod use a different mechanism to store the data that needs to be replayed for saving

You can use dev.copy2pdf directly of course as well. 

HTH
Jeff

Jeffrey Ryan    |    Founder    |    jeffrey.ryan at lemnica.com

www.lemnica.com

On Apr 18, 2013, at 10:43 AM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:

> On Wed, Apr 17, 2013 at 7:43 PM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
>> You need to update quantmod too.  You don't say which version of
>> quantmod you're using, but R-3.0.0 requires you to use quantmod_0.4-0.
> 
> After further investigation, it looks like this is a bug.  I can
> reproduce it with quantmod_0.4-0 and R-2.15.2 on Windows.
> 
> library(quantmod)
> getSymbols("SPY")
> chartSeries(SPY)
> saveChart()
> Error in assign(".chob", x, env) :
>  cannot change value of locked binding for '.chob'
> 
> sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: i386-w64-mingw32/i386 (32-bit)
> 
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] quantmod_0.4-0 TTR_0.21-1     xts_0.9-3      zoo_1.7-10     Defaults_1.1-1
> 
> loaded via a namespace (and not attached):
> [1] grid_2.15.2     lattice_0.20-10
> 
> 
>> --
>> Joshua Ulrich  |  about.me/joshuaulrich
>> FOSS Trading  |  www.fosstrading.com
>> 
>> R/Finance 2013: Applied Finance with R  | www.RinFinance.com
>> 
>> 
>> On Wed, Apr 17, 2013 at 7:29 PM, Sávio Ramos <savio.debian at gmail.com> wrote:
>>> Hi,
>>> 
>>> After upgraded R to realese 3.o saveChart don't work more, error is:
>>> 
>>>>  saveChart('pdf',width=25,height=13)
>>> Erro em assign(".chob", x, env) :
>>>  não é possível mudar o valor de vinculo bloqueado para '.chob'
>>> 
>>> Is there any workaround?
>>> 
>>> Thanks.
>>> --
>>> Sávio M Ramos
>>> Arquiteto, Rio, RJ
>>> Só uso Linux desde 2000
>>> www.debian.org
>>> 
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions should go.
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list