We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 818e503 commit a1a239cCopy full SHA for a1a239c
tests/testthat/tests-points.R
@@ -58,3 +58,18 @@ test_that("points.gsplot accepts formulas",{
58
59
})
60
61
+test_that("points works with indexing", {
62
+
63
+ x <- 7:10
64
+ gs <- gsplot() %>%
65
+ points(x)
66
+ expect_equal(class(gs$view.1.2$points$y), "integer")
67
+ expect_equal(gs$view.1.2$points$x, seq_along(x))
68
69
70
+ oct_dates <- seq(as.Date("2015-10-11"), as.Date("2015-10-15"), by="days")
71
+ gs_dates <- gsplot() %>%
72
+ points(oct_dates)
73
+ expect_equal(class(gs_dates$view.1.2$points$y), "Date")
74
+ expect_equal(gs_dates$view.1.2$points$x, seq_along(oct_dates))
75
+})
0 commit comments