Skip to content

Commit d65cc75

Browse files
committed
Symmetry between $ and [[ methods
1 parent 4d85eca commit d65cc75

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

R/plot.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,9 @@ S7::method(plot, class_ggplot) <- `print.ggplot2::ggplot`
272272
}
273273

274274
#' @export
275-
`[[.ggplot2::gg` <- function(x, i) {
276-
`[[`(S7::props(x), i)
277-
}
275+
`[[.ggplot2::gg` <- `$.ggplot2::gg`
278276

279277
#' @export
280-
`[[<-.ggplot2::gg` <- function(x, i, value) {
281-
S7::props(x) <- `[[<-`(S7::props(x), i, value)
282-
x
283-
}
278+
`[[<-.ggplot2::gg` <- `$<-.ggplot2::gg`
284279

285280

0 commit comments

Comments
 (0)