Yao-Jen Kuo
counts <- table(mtcars$gear)
barplot(counts, main="Basic Plotting System", horiz=TRUE, names.arg=c("3 Gears", "4 Gears", "5 Gears"))
library(ggplot2)
ggplot(mtcars, aes(factor(gear)))+geom_bar()+coord_flip()
library(plotly)
countsDF <- data.frame(counts)
plot_ly(countsDF, x=Freq, y=Var1, type="bar", orientation="h")
library(leaflet)
helloMap <- leaflet() %>%
addTiles() %>% #把預設的地圖圖層加入
addMarkers(lng=121.539366, lat=25.017326, popup="National Taiwan University")
helloMap