Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
  ...
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
  ...
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in 'plotBart-Ex.R' failed
The error most likely occurred in:

> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
--- re-building 'modifying-plots.Rmd' using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building 'modifying-plots.Rmd'

SUMMARY: processing the following file failed:
  'modifying-plots.Rmd'

Error: Vignette re-building failed.
Execution halted
Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
  ...
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in ‘plotBart-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
  ...
--- re-building ‘modifying-plots.Rmd’ using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building ‘modifying-plots.Rmd’

SUMMARY: processing the following file failed:
  ‘modifying-plots.Rmd’

Error: Vignette re-building failed.
Execution halted
Running examples in 'plotBart-Ex.R' failed
The error most likely occurred in:

> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
--- re-building 'modifying-plots.Rmd' using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building 'modifying-plots.Rmd'

SUMMARY: processing the following file failed:
  'modifying-plots.Rmd'

Error: Vignette re-building failed.
Execution halted
Running examples in 'plotBart-Ex.R' failed
The error most likely occurred in:

> ### Name: plot_balance
> ### Title: Plot the balance
> ### Aliases: plot_balance
> 
> ### ** Examples
> 
> data(lalonde)
> plot_balance(lalonde, 'treat', c('re78', 'age', 'educ')) + labs(title = 'My new title')
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
Backtrace:
     ▆
  1. ├─plotBart::plot_balance(lalonde, "treat", c("re78", "age", "educ"))
  2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
  3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
  4. ├─stats::na.omit(.)
  5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
  6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
  7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  8. │   └─base::withCallingHandlers(...)
  9. ├─dplyr:::dplyr_internal_error(...)
 10. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
 11. │   └─rlang:::signal_abort(cnd, .file)
 12. │     └─base::signalCondition(cnd)
 13. └─dplyr (local) `<fn>`(`<dpl:::__>`)
 14.   └─dplyr (local) handler(cnd)
 15.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted
Error(s) in re-building vignettes:
--- re-building 'modifying-plots.Rmd' using rmarkdown

Quitting from modifying-plots.Rmd:23-33 [setup]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `summarize()`:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
---
Backtrace:
    ▆
 1. ├─plotBart::plot_balance(...)
 2. │ └─... %>% ggplot(aes(x = diff, y = name, color = abs(diff)))
 3. ├─ggplot2::ggplot(., aes(x = diff, y = name, color = abs(diff)))
 4. ├─stats::na.omit(.)
 5. ├─dplyr::summarize(., diff = mean - lag(mean), .groups = "drop")
 6. ├─dplyr:::summarise.grouped_df(., diff = mean - lag(mean), .groups = "drop")
 7. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
 8. │   └─base::withCallingHandlers(...)
 9. └─dplyr:::dplyr_internal_error(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'modifying-plots.Rmd' failed with diagnostics:
ℹ In argument: `diff = mean - lag(mean)`.
ℹ In group 1: `name = "age"`.
Caused by error:
! `diff` must be size 1, not 2.
ℹ To return more or less than 1 row per group, use `reframe()`.
--- failed re-building 'modifying-plots.Rmd'

SUMMARY: processing the following file failed:
  'modifying-plots.Rmd'

Error: Vignette re-building failed.
Execution halted