Skip to content

Commit 41b4d2e

Browse files
Jordan S ReadLindsay Carr
authored andcommitted
merge conflicts jread df commit 3
1 parent cae685c commit 41b4d2e

File tree

2 files changed

+4
-35
lines changed

2 files changed

+4
-35
lines changed

R/function_args.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ function_args <- function(package, name, object=c(), ..., use.default=paste0(nam
1515

1616
if (!missing(object)) {
1717
params <- append_params(object, params)
18-
}
18+
} else {
19+
object=c()
20+
}
1921

2022
if (length(params) == 0)
2123
return(list())
2224

25+
2326
# // is there a method for this class?
2427
defFun <- getS3method(name,class(object),optional=TRUE) # will be NULL when object is missing
2528
if (is.null(defFun)){

tests/testthat/tests-axis.R

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,7 @@ test_that("axis reverse",{
4747

4848
})
4949

50-
context('multiple axis on the same side can be used')
51-
test_that("axis can append a second one",{
52-
gs <- gsplot() %>%
53-
points(0:1,0:1) %>%
54-
axis(side=1, at=c(0.5,1)) %>%
55-
axis(side=1, at=c(0.25, 0.75), append=TRUE)
56-
expect_equal(sum(names(gs$side.1) == 'axis'), 2)
57-
})
5850

59-
test_that("axis can append a third one and the forth clears them",{
60-
gs <- gsplot() %>%
61-
points(0:1,0:1) %>%
62-
axis(side=1, at=c(0.5,1)) %>%
63-
axis(side=1, at=c(0.25, 0.75), append=TRUE) %>%
64-
axis(side=1, at=c(0.45, 0.55), append=TRUE)
65-
66-
expect_equal(sum(names(gs$side.1) == 'axis'), 3)
67-
gs <- gsplot() %>%
68-
points(0:1,0:1) %>%
69-
axis(side=1, at=c(0.5,1)) %>%
70-
axis(side=1, at=c(0.25, 0.75), append=TRUE) %>%
71-
axis(side=1, at=c(0.45, 0.55), append=TRUE) %>%
72-
axis(side=1, at=c(0.33))
73-
expect_equal(sum(names(gs$side.1) == 'axis'), 1)
74-
expect_equal(gs$side.1$axis$at, 0.33)
75-
})
76-
77-
test_that("axis tracks append FALSE by default",{
78-
gs <- gsplot() %>%
79-
points(0:1,0:1) %>%
80-
axis(side=1, at=c(0.5,1)) %>%
81-
axis(side=1, at=c(0.25, 0.75)) %>%
82-
axis(side=1, at=c(0.45, 0.55), append=TRUE)
83-
expect_equal(sum(names(gs$side.1) == 'axis'), 2)
84-
})
8551

8652
context("axis user flipped on")
8753

0 commit comments

Comments
 (0)