saveChart don't work in Quantmod package

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

saveChart don't work in Quantmod package

Sávio Ramos
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

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: saveChart don't work in Quantmod package

Joshua Ulrich
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.
--
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 <[hidden email]> 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
>
> _______________________________________________
> [hidden email] 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.

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: saveChart don't work in Quantmod package

Joshua Ulrich
On Wed, Apr 17, 2013 at 7:43 PM, Joshua Ulrich <[hidden email]> 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 <[hidden email]> 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
>>
>> _______________________________________________
>> [hidden email] 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.

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: saveChart don't work in Quantmod package

Jeffrey Ryan
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    |    [hidden email]

www.lemnica.com

On Apr 18, 2013, at 10:43 AM, Joshua Ulrich <[hidden email]> wrote:

> On Wed, Apr 17, 2013 at 7:43 PM, Joshua Ulrich <[hidden email]> 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 <[hidden email]> 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
>>>
>>> _______________________________________________
>>> [hidden email] 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.
>
> _______________________________________________
> [hidden email] 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.

_______________________________________________
[hidden email] 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.