@@ -121,10 +121,10 @@ add_boxed <- function(x) {
121
121
idx <- names(d ) %in% get_boxed(d $ type %|| % " scatter" ) & sapply(d , length ) == 1
122
122
if (any(idx )) x $ data [[i ]][idx ] <- lapply(d [idx ], I )
123
123
# (safely) mark individual nested properties
124
- d $ error_x $ array <- i(d $ error_x $ array )
125
- d $ error_y $ array <- i(d $ error_y $ array )
126
- d $ error_x $ arrayminus <- i(d $ error_x $ arrayminus )
127
- d $ error_y $ arrayminus <- i(d $ error_y $ arrayminus )
124
+ x $ data [[ i ]] $ error_x $ array <- i(d $ error_x $ array )
125
+ x $ data [[ i ]] $ error_y $ array <- i(d $ error_y $ array )
126
+ x $ data [[ i ]] $ error_x $ arrayminus <- i(d $ error_x $ arrayminus )
127
+ x $ data [[ i ]] $ error_y $ arrayminus <- i(d $ error_y $ arrayminus )
128
128
}
129
129
x
130
130
}
@@ -154,22 +154,6 @@ boxers <- list(
154
154
155
155
i <- function (x ) if (is.null(x )) x else I(x )
156
156
157
- # ' Pick an element from a nested list
158
- # ' @param x a list
159
- # ' @param nms a character vector specifying a search path
160
- # ' @example
161
- # ' x <- list(a = list(b = list(c = "Come and get it!")))
162
- # ' pick(x, c("a", "b", "c"))
163
- # ' #> [1] "Come and get it!"
164
- pick <- function (x , nms ) {
165
- for (i in seq_along(nms )) {
166
- nm <- nms [i ]
167
- x <- x [[nm ]]
168
- }
169
- x
170
- }
171
-
172
-
173
157
rm_asis <- function (x ) {
174
158
# jsonlite converts NULL to {} and NA to null (plotly prefers null to {})
175
159
# https://github.com/jeroenooms/jsonlite/issues/29
0 commit comments