@@ -151,6 +151,22 @@ repr_vegalite2 <- function(obj, ...) UseMethod('repr_vegalite2', obj)
151
151
repr_vegalite2.default <- function (obj , ... ) NULL
152
152
153
153
154
+ # ' @name repr-generics
155
+ # ' @export
156
+ repr_vegalite3 <- function (obj , ... ) UseMethod(' repr_vegalite3' , obj )
157
+ # ' @name repr-generics
158
+ # ' @export
159
+ repr_vegalite3.default <- function (obj , ... ) NULL
160
+
161
+
162
+ # ' @name repr-generics
163
+ # ' @export
164
+ repr_vegalite4 <- function (obj , ... ) UseMethod(' repr_vegalite4' , obj )
165
+ # ' @name repr-generics
166
+ # ' @export
167
+ repr_vegalite4.default <- function (obj , ... ) NULL
168
+
169
+
154
170
# ' @name repr-generics
155
171
# ' @export
156
172
repr_vega4 <- function (obj , ... ) UseMethod(' repr_vega4' , obj )
@@ -159,6 +175,14 @@ repr_vega4 <- function(obj, ...) UseMethod('repr_vega4', obj)
159
175
repr_vega4.default <- function (obj , ... ) NULL
160
176
161
177
178
+ # ' @name repr-generics
179
+ # ' @export
180
+ repr_vega5 <- function (obj , ... ) UseMethod(' repr_vega5' , obj )
181
+ # ' @name repr-generics
182
+ # ' @export
183
+ repr_vega5.default <- function (obj , ... ) NULL
184
+
185
+
162
186
# ' Lists mapping mime types (\code{mime2repr}) or format names (\code{format2repr}) to \code{repr} functions
163
187
# '
164
188
# ' @format Lists mapping mime/name to function
@@ -180,7 +204,10 @@ mime2repr <- list(
180
204
' application/vdom.v1+json' = repr_vdom1 ,
181
205
' application/vnd.plotly.v1+json' = repr_plotly1 ,
182
206
' application/vnd.vegalite.v2+json' = repr_vegalite2 ,
207
+ ' application/vnd.vegalite.v3+json' = repr_vegalite3 ,
208
+ ' application/vnd.vegalite.v4+json' = repr_vegalite4 ,
183
209
' application/vnd.vega.v4+json' = repr_vega4 ,
210
+ ' application/vnd.vega.v5+json' = repr_vega5 ,
184
211
' application/pdf' = repr_pdf ,
185
212
' image/png' = repr_png ,
186
213
' image/jpeg' = repr_jpg ,
@@ -189,5 +216,5 @@ mime2repr <- list(
189
216
# ' @name *2repr
190
217
# ' @export
191
218
format2repr <- sapply(
192
- c(' text' , ' html' , ' markdown' , ' latex' , ' javascript' , ' json' , ' geojson' , ' vdom1' , ' plotly1' , ' vegalite2 ' , ' vega4 ' , ' pdf' , ' png' , ' jpg' , ' svg' ),
219
+ c(' text' , ' html' , ' markdown' , ' latex' , ' javascript' , ' json' , ' geojson' , ' vdom1' , ' plotly1' , paste0( ' vegalite ' , 2 : 4 ), paste0( ' vega ' , 4 : 5 ) , ' pdf' , ' png' , ' jpg' , ' svg' ),
193
220
function (n ) get(paste0(' repr_' , n )))
0 commit comments