Skip to content

Commit

Permalink
Merge pull request badbye#6 from seifer08ms/master
Browse files Browse the repository at this point in the history
Correcting documents of getCoordinate() and getLocation()
  • Loading branch information
badbye authored Dec 14, 2016
2 parents 2779592 + 0998c8f commit 7837955
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions R/getCoordinate.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ getCoordinate.core = function(address, city=NULL, output='json', formatted = F){
#' @examples
#' \dontrun{
#' ## json output
#' getCoordinate('beijingdaxue')
#' getCoordinate('北京大学')
#'
#' ## xml output
#' getCoordinate('beijingdaxue', output='xml')
#' getCoordinate('北京大学', output='xml')
#'
#' ## formatted
#' getCoordinate('beijingdaxue', formatted = T)
#' getCoordinate('北京大学', formatted = T)
#'
#' ## vectorization, return a matrix
#' getCoordinate(c('beijingdaxue', 'qinghuadaxue'), formatted = T)
#' getCoordinate(c('北京大学', '清华大学'), formatted = T)
#' }
getCoordinate=function(address, city=NULL, output='json', formatted = F,limit=600){
if(length(address)<limit){
Expand Down
4 changes: 2 additions & 2 deletions R/getLocation.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ getLocation.core = function(location, output='json', formatted = F, pois=0){
#'
#' \dontrun{
#' ## get one location
#' location_one = getLocation(118.12845, 24.57742)
#' location_one = getLocation(c(118.12845, 24.57742))
#'
#' ## vectorization
#' loc = matrix(c(117.93780, 24.55730, 117.93291, 24.57745, 117.23530, 24.64210, 117.05890, 24.74860), byrow=T, ncol=2)
Expand All @@ -64,7 +64,7 @@ getLocation.core = function(location, output='json', formatted = F, pois=0){
#'
getLocation=
function (location, output = "json", formatted = F, pois = 0,limit=600) {
if(nrow(location)<limit){
if(NROW(location)<limit){
res<-getLocation.core(location, output, formatted , pois)
}else if(require(parallel)){
cl <- makeCluster(getOption("cl.cores", detectCores()*0.8))
Expand Down
8 changes: 4 additions & 4 deletions man/getCoordinate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/getLocation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7837955

Please sign in to comment.