Bearloga has uploaded a new change for review.
https://gerrit.wikimedia.org/r/241083
Change subject: Removes a bug Datasets where the second column did not have
variability were regarded as single-variable datasets.
......................................................................
Removes a bug
Datasets where the second column did not have variability were regarded as
single-variable datasets.
Change-Id: Icf97bac99030de674589d78b77f46bd4e93946ce
---
M R/dygraphs.R
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/polloi
refs/changes/83/241083/1
diff --git a/R/dygraphs.R b/R/dygraphs.R
index 3b9e011..204edac 100644
--- a/R/dygraphs.R
+++ b/R/dygraphs.R
@@ -29,15 +29,15 @@
#'@importFrom magrittr "%>%"
#'
#'@export
-make_dygraph <- function(data, xlab, ylab, title, legend_name = NULL, use_si =
TRUE, expr = NULL){
+make_dygraph <- function(data, xlab, ylab, title, legend_name = NULL, use_si =
TRUE, expr = NULL) {
#Evaluate the expression
expr
# If we've only got a single variable reformatting into an XTS looks weird,
but otherwise we're
# all cool.
- if(ncol(data) == 2 || length(unique(data[,2])) == 1){
- if(is.null(legend_name)){
+ if (ncol(data) == 2) {
+ if (is.null(legend_name)) {
legend_name <- names(data)[2]
}
data <- xts(data[, ncol(data)], data[, 1])
@@ -66,7 +66,7 @@
#'
#'@export
cond_color <- function(condition, true_color = "green") {
- if(is.na(condition)){
+ if (is.na(condition)) {
return("black")
}
--
To view, visit https://gerrit.wikimedia.org/r/241083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf97bac99030de674589d78b77f46bd4e93946ce
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/polloi
Gerrit-Branch: master
Gerrit-Owner: Bearloga <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits