File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -276,14 +276,14 @@ S7::method(plot, class_ggplot) <- `print.ggplot2::ggplot`
276
276
`[[<-.ggplot2::gg` <- `$<-.ggplot2::gg`
277
277
278
278
# ' @importFrom S7 convert
279
- S7 :: method(convert , list (from = class_ggplot , to = S7 :: class_list )) <-
280
- function (from , to ) {
281
- S7 :: props(from )
282
- }
283
- rm(`convert` )
284
-
285
279
# S7 currently attaches the S3 method to the calling environment which gives `ggplot2:::as.list`
286
280
# Wrap in `local()` to provide a temp environment which throws away the attachment
287
281
local({
288
- S7 :: method(as.list , class_ggplot ) <- function (x , ... ) convert(x , S7 :: class_list )
282
+ S7 :: method(convert , list (from = class_ggplot , to = S7 :: class_list )) <-
283
+ function (from , to ) {
284
+ S7 :: props(from )
285
+ }
286
+
287
+ S7 :: method(as.list , class_ggplot ) <-
288
+ function (x , ... ) convert(x , S7 :: class_list )
289
289
})
You can’t perform that action at this time.
0 commit comments