Skip to content

Commit

Permalink
Translate xsubset into length of the series
Browse files Browse the repository at this point in the history
To coordinate with addPoints(), when x is specified by numeric vector and
without subsetting the intersection of x and the index of series will be
FALSE because xsubset is always "". It should be the index of the raw series,
namely, 1:NROW(x), which is also the original setting in chartSeries.
  • Loading branch information
erichung0404 committed Aug 7, 2016
1 parent b62b868 commit adf2ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/chartSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function(x,
sub.index <- index(do.call(subsetvec[1],list(x,subset.n)))
xsubset <- which(index(x) %in% sub.index)
} else xsubset <- which(index(x) %in% index(x[subset]))
} else xsubset <- ""
} else xsubset <- 1:NROW(x)

xdata <- x
x <- x[xsubset]
Expand Down

0 comments on commit adf2ea1

Please sign in to comment.