R variable in JavaScript -


i displaying map via leaflet r using package rcharts:
added polygons map , want information clicking on them. far managed popup window display features name. display values r variables, dont know how pass them over/include them javascript statement (see code.)

map <- leaflet$new()       map$geojson((polygons),     oneachfeature = "#! function(feature, layer){     layer.bindpopup('<b>name:</b>' + feature.properties.name + '<br> <b>precipitation:</b> insert r variable here')     } !#")       map 

i don't see why can't paste in value character string. example

map <- leaflet$new() map$geojson((polygons), oneachfeature = paste("#! function(feature, layer){",     "layer.bindpopup('<b>name:</b>' + feature.properties.name + '<br> ",     "<b>precipitation:</b>", varibalename, "')} !#", sep="") ) map 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -