Dot density map help (ratios) error :could not find function "calc_dots"

I am shooting in the dark here having never used this package or sf. I notice that the last step on Robert Hickman's blog before running calc-dots is to use st_as_sf()

language_data %<>%
  #convert number of speakers to numeric
  mutate(primary_speakers = as.numeric(as.character(primary_speakers))) %>%
  #matching of area names with South African shapefile
  mutate(region = gsub(" NU", "", region)) %>%
  mutate(region = gsub("Tshwane", "City of Tshwane", region)) %>%
  #filter only the data we want to merge
  filter(region %in% south_africa$region) %>%
  filter(!is.na(language)) %>%
  filter(language != "Not applicable") %>%
  #spread the data
  dcast(., region ~ language, value.var = "primary_speakers", fun.aggregate = sum) %>%
  #join in the spatial geometry
  left_join(., south_africa) %>%
  #convert to sf
  st_as_sf()

If that does not fix your problem, please try to post a reproducible example. There are several posts and tutorials about how to do that. Here is one: FAQ: Reprex, How To