You can manually change class
and attr
to match the original raster.
library(ggmap)
loc <- c(left = -73.706, bottom = 42.6940, right = -73.648, top = 42.7921)
troy <- get_map(location = loc, zoom = 13, maptype = "toner", source = "stamen")
attr_troy <- attr(troy, "bb") # save attributes from original
# change color in raster
troy[troy == "#000000"] <- "#C0C0C0"
# correct class, attributes
class(troy) <- c("ggmap", "raster")
attr(troy, "bb") <- attr_troy
ggmap(troy)