On 05 Jul 2023 Joshua Ulrich <[email protected]> wrote:

> On Wed, Jul 5, 2023 at 3:11 PM Mike <[email protected]> wrote:

> > > packageVersion('quantmod')
> > [1] '0.4.23'

> > On an older machine running quantmod 0.4.20 I get this message as a
> > warning instead of an error.

> That chart_Series() code didn't change between those 2 versions of
> quantmod. This went from a warning to an error based on changes in R
> itself. You can verify by running the code below on both machines:
> 
> ta <- list("a", "b")
> !is.null(ta) && nchar(ta) > 0
> ## Error in !is.null(ta) && nchar(ta) > 0 :
> ##  'length = 2' in coercion to 'logical(1)'

Yes, it seems to be a change in R. The newer machine is running R
4.3.0, the older is running R 4.2.3.

> The chart_Series() docs say that the TA arg should be "a character
> string of semi-colon seperated TA calls". So you can do this:
> 
> chart_Series(data, name = "test data", TA = paste(ta, collapse = ";"))

This did it.

Thanks Josh.

Mike

_______________________________________________
[email protected] 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 via email to