Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in if (markLineLogi & markPointLogi & !geoDataLogi) { : the condition has length > 1 #61

Open
englianhu opened this issue Jun 6, 2022 · 1 comment

Comments

@englianhu
Copy link

englianhu commented Jun 6, 2022

## Plot the REmap shining 
+导航图 <- remapC(随机国号, maptype = 'world', 
               color = c('black', 'black'),
               theme = get_theme(backgroundColor = 'black'), 
               title = '量化圈', subtitle = '金融计量经济学', 
               markPointData = 诸城镇, markLineData = 导航线, 
               geoData = 经纬度)
+knitrREmap(导航图, local = FALSE)
-Error in if (markLineLogi & markPointLogi & !geoDataLogi) { : 
-  the condition has length > 1

部署夜光导航图时,出现以上错误信息,请瞧一瞧~


#29 (comment) 读取从maps::world.cities程序包翻译并储存中文地名文件

## 读取从maps::world.cities程序包翻译并储存中文地名文件
#source('data/geoname.R')
经纬度 <- read_csv('data/地图数据.csv', show_col_types = FALSE)

诸国 <- 经纬度$国家 |> 
  unique()

## 随即设置区域号
随机国号 <- data.frame(
  国家 = 诸国, 
  国号 = 5 * sample(length(诸国)) + 200)

## 城镇矢量
诸城镇 <- 经纬度$城镇

## 城镇经纬度
经纬度 <- 经纬度 |> 
  dplyr::select(经度, 纬度, 城镇)

## 描画彩色霓虹导航线
夜光导航线 <- data.frame(
  出发点 = rep('郑州市', (nrow(经纬度) - 1)), 
  抵达点 = 经纬度$城镇[!经纬度$城镇 %in% '郑州市'])
## Plot the REmap shining 
导航图 <- remapC(随机国号, maptype = 'world', 
               color = c('black', 'black'),
               theme = get_theme(backgroundColor = 'black'), 
               title = '量化圈', subtitle = '金融计量经济学', 
               markPointData = 诸城镇, markLineData = 夜光导航线, 
               geoData = 经纬度)
knitrREmap(导航图, local = FALSE)
@englianhu englianhu changed the title Error in if (markLineLogi & markPointLogi & !geoDataLogi) { : the condition has length > 1 Error in if (markLineLogi & markPointLogi & !geoDataLogi) { : the condition has length > 1 Sep 30, 2022
@chameleonzz
Copy link

chameleonzz commented Mar 24, 2023

I also met this problem when I want to plot the longitude and latitude of many points in a city. Could the function plot only in one city? I found most of the examples about REMap plot multiple cities location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants