ramnathv / rMaps

Interactive Maps from R
http://rmaps.github.io
389 stars 194 forks source link

mapOutput #63

Closed sanchez5674 closed 10 years ago

sanchez5674 commented 10 years ago

Hi,

I install rCharts and try to run a simple example:

Installing github repo rCharts/master from ramnathv Downloading master.zip from https://github.com/ramnathv/rCharts/archive/master.zip Installing package from C:\Users\UCXS920\AppData\Local\Temp\RtmpO213hs/master.zip Installing rCharts "C:/PROGRA~1/R/R-31~1.0/bin/x64/R" --vanilla CMD INSTALL \ "C:\Users\UCXS920\AppData\Local\Temp\RtmpO213hs\devtools144876b3682\rCharts-master" \ --library="C:/Users/UCXS920/Documents/R/win-library/3.1" \ --install-tests

library(rCharts) library(shiny)

runApp(list(

Everything seems to be fine. However, it gives me the following error which is related to the mapOutput function:

Error in system.file("libraries", lib, package = package) : object 'package' not found

Any ideas?

By the way, I wrote a similar question to the Shiny-discussion group.

Thanks for your help. Carlos.

ramnathv commented 10 years ago

Replace mapOutput with chartOutput("myChart", 'leaflet') for now. There seems to be a minor bug in mapOutput due to some recent changes. Here is the full code for your reference.

library(rCharts)
library(shiny) 

runApp(list(
  ui = pageWithSidebar(
    headerPanel("Title"),
    sidebarPanel("MyApp" ),
    mainPanel(
      tabsetPanel(
        tabPanel("Interactive Map", chartOutput("myChart", 'leaflet'))
      )
    )
  ),
  server = function(input, output){
    output$myChart <- renderMap({
      map3 <- Leaflet$new()
      map3$setView(c(19.4329,- 99.1331), zoom = 8)
      map3
    })
  }
))