lundi 7 décembre 2015

Error In UseMethod("doResolveFormula")

I'm using the following code to put three different types of markers for each level of a categorical variable RSPM.

leaflet(df) %>% addTiles() %>%
addCircleMarkers(~Long, ~Lat, popup = ~as.character(RSPM),
radius = ~if(RSPM=="Critical"){
  10
}else if (RSPM=="High"){
  6
} else if (RSPM=="Moderate")
  2,
color = ~pal(type),
stroke = FALSE, fillOpacity =  0.5
)

The following is the error message:

Error in UseMethod("doResolveFormula") : 
  no applicable method for 'doResolveFormula' applied to an object of class "function"

Don't know what this error message is referring to, and how to fix it. This is using leaflet.

Aucun commentaire:

Enregistrer un commentaire