You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had expected to be able to access x inside of the expression in the same way regardless of whether .grid was a tbl_df or data.frame, but for the former, I'd need to write x$x to match the format of the latter:
library(tibble)
bench::press({print(x); bench::mark()}, .grid= tibble(x=1))
#> Running with:#> x#> 1 1#> # A tibble: 1 × 1#> x#> <dbl>#> 1 1#> # A tibble: 0 × 7#> # ℹ 7 variables: expression <bch:expr>, x <dbl>, min <bch:tm>, median <bch:tm>,#> # itr/sec <dbl>, mem_alloc <bch:byt>, gc/sec <dbl>bench::press({print(x); bench::mark()}, .grid=data.frame(x=1))
#> Running with:#> x#> 1 1#> [1] 1#> # A tibble: 0 × 7#> # ℹ 7 variables: expression <bch:expr>, x <dbl>, min <bch:tm>, median <bch:tm>,#> # itr/sec <dbl>, mem_alloc <bch:byt>, gc/sec <dbl>
I had expected to be able to access
x
inside of the expression in the same way regardless of whether.grid
was atbl_df
ordata.frame
, but for the former, I'd need to writex$x
to match the format of the latter:Created on 2024-07-02 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: