Closed opus1993 closed 1 year ago
I cannot reproduce this error. However, the unit_type
attribute is assigned with compile_activities()
based on your decision and cannot be changed using get_heat_map()
if you are using a actframe
object as input.
You should see a warning as follows if the unit attribute in actframe
does not match the units
argument in get_heat_map()
. The units
argument doesn't do anything for actframe
objects.
> get_heat_map(act_data, key = google_key, maptype = 'satellite', f = 1, size = 2, units = 'imperial', distlab = F)
Warning message:
In get_heat_map.actframe(act_data, key = google_key, maptype = "satellite", :
units does not match unit type, use compile_activities with different units
To remedy, you can recreate act_data
with different units:
act_data <- compile_activities(my_acts, units = 'imperial')
get_heat_map(act_data, key = google_key)
Or, simply use my_acts
as input to get_heat_map()
. This will allow full use of the units
argument.
get_heat_map(my_acts, key = google_key, units = 'imperial')
get_heat_map(my_acts, key = google_key, units = 'metric')
thank you
to get get_heat_map() to plot, I had to assign the attribute manually
attr(act_data, "unit_type") <- "imperial"