我错了,还是 ggmap 缩放参数范围有问题?如果我运行以下命令,它会给我找不到错误对象“thezoom”:
myfunction<-function(thezoom=14){
qmap(location = 'baylor university', zoom = thezoom)
}
myfunction()
但是如果 thezoom 在全局范围内,如下所示:
thezoom=14
myfunction<-function(){
qmap(location = 'baylor university', zoom = thezoom)
}
myfunction()
我正在尝试编写一个允许用户指定缩放的函数,但我遇到了一些麻烦。
想法?
ZR