Last active
February 2, 2016 06:14
-
-
Save raphifix/847f73e8cc7d6a7da9a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line_list <- list() | |
for(i in 1:nrow(line_dat)){ | |
line_color <- ifelse(line_dat$signal[i] == 'buy', 'green', 'red') | |
line_list[[i]] <- list(type = "line", | |
fillcolor = line_color, line = list(color = line_color), opacity = 0.3, | |
x0 = line_dat[[1]][i], x1 = line_dat[[1]][i], xref = "x", | |
y0 = 0, y1 = line_dat[[2]][i], yref = "y") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment