Why would script call round_any despite not being explicitly called?

Viewed 24

I've been struggling with this script for the past month and I still haven't been able to answer this question. I know round_any is used in the plyr package but I don't even load it. I checked all my other packages using ls("package: ") and they don't have this function. Nothing else I find online has been able to point me in the right direction. In browser () I am able to see my type is double [4] (S3:integer64). Am I better off just changing my class from integer64 or finding out how to remove round_any?

Error in `mutate()`:
! Problem while computing `..2 = across(...)`.
Caused by error in `across()`:
! Problem while computing column `Property Count`.
Caused by error in `UseMethod()`:
! no applicable method for 'round_any' applied to an object of class "integer64"

Edit: This .r file contains all the functions and I have another .r file that calls them.

Argument/Call

market_stats_table = key_market_stats(historical_stats, historical_stats_by_class, report_quarter)

Function

  total_stats = stats_combined %>% 
    rename(`Net Absorption` = `Net Absorption QTD - Total`, 
           `Net Absorption YTD` = `Net Absorption YTD - Total`,
           `Construction Deliveries` = `Construction Deliveries QTD`) %>% 
    filter(Submarket %in% submarket_order) %>% 
    mutate(Submarket = factor(Submarket, levels = submarket_order, ordered = T)) %>% 
     arrange(Submarket)  %>% 
     # glimpse()
     mutate(across(c(`Direct Vacancy Rate`, `Overall Vacancy Rate`, `Overall Availability Rate`), scales::percent, accuracy = .1),
            across(any_of(sum_vars), 
                   scales::dollar, accuracy = 1, style_negative="parens", prefix=""),
            across(any_of(c("Full Service Gross Asking Rate", "Lease Rate")),
                   scales::dollar)) %>%
     select(Submarket, all_of(stat_order))
   market_stats_table(total_stats, 
                      cell_width = if_else(property_type == "Office", 1.05, .9), 
                      cell_height = if_else(property_type == "Office", .33, .27),
                      submarket_order,
                      totals)
 }

structure

structure(list(Market = c("Los Angeles", "0.4", NA, "0.5", "0.3", 
"New York"), `Property Count` = c("New York", "0.3", NA, "0.2", 
"0.9", "New York"), C = c("Chicago", "0.1", NA, "0.4", "0.3", 
"DC"), D = c("DC", "0.7", NA, "0", "0.2", "DC"), e = c("Miami", 
"0.8", NA, "0.2", "0.1", "Los Angeles")), row.names = c(NA, 6L
), class = "data.frame")

0 Answers
Related