小编Fre*_*ial的帖子

无法在 R 中绘制 sf 线串:CPL_geos_is_empty(st_geometry(x)) 中的错误

我有飓风轨迹点,我将其转换为 QGIS 中的线:

https://i.stack.imgur.com/Gtt61.png

https://i.stack.imgur.com/6z8MO.png

我已将两者保存为 shapefile 并使用sf包将它们加载到 R 中。点将使用标准plot()函数绘制,但线不会。

我遇到了错误:

plot(hurricane_paths)
Error in CPL_geos_is_empty(st_geometry(x)) : 
     Evaluation error: IllegalArgumentException: point array must contain 0 or >1 elements.
Run Code Online (Sandbox Code Playgroud)

我使用时也出现同样的错误plot(st_geometry(hurricane_paths))

不过,R 肯定会加载到几何中:

> hurricane_paths
Simple feature collection with 1410 features and 5 fields
geometry type:  LINESTRING
dimension:      XY
bbox:           xmin: -179.9 ymin: -4.9 xmax: 8 ymax: 70.7
epsg (SRID):    4269
proj4string:    +proj=longlat +datum=NAD83 +no_defs
First 10 features:
             N.A begin  end Year           N.A_1                       geometry
1  1976143N24271  <NA> <NA> …
Run Code Online (Sandbox Code Playgroud)

gis geometry r qgis r-sf

5
推荐指数
1
解决办法
2577
查看次数

最大化 R Shiny bs4Dash 中的绘图

我在网上到处查了一下没有结果。我似乎无法让这些图在最大化盒子时将其高度和宽度最大化到整个窗口大小。这是我使用的要求bs4Dash。我查看了这篇文章,但提供的解决方案似乎对我不起作用。我缺少什么?

library(shiny)
library(bs4Dash)
library(circlepackeR) # devtools::install_github("jeromefroe/circlepackeR")
library(wordcloud2) # devtools::install_github("lchiffon/wordcloud2")
library(plotly)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(id="histbox", 
          title = "hist box", 
          plotOutput("plot1", 
                     height = 250),
          maximizable = T),
      
      box(id = "circlebox", title="circle box", 
          circlepackeR::circlepackeROutput("circles"), maximizable = T)
      
    ),
    fluidRow(
      box(id="wordlcoudbox", 
          title = "wordcloud box", 
          wordcloud2::wordcloud2Output("cloud"), 
          maximizable = T),
      
      box(id = "plotlybox",
          title = "plotly box", 
          plotly::plotlyOutput("plotlyplot"), 
          maximizable = T))
  )
) …
Run Code Online (Sandbox Code Playgroud)

r shiny adminlte wordcloud2 bs4dash

4
推荐指数
1
解决办法
755
查看次数

显示 Mac 终端中隐藏的文件和文件夹

我不敢相信我找不到一个好的解决方案...我有一个名为的隐藏文件夹.venv,我想在我的 Mac OS Monterey 12.3.1 终端输出中显示它。

我试过了:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Run Code Online (Sandbox Code Playgroud)

.venv但是当我在包含并键入的目录中打开终端时ls,不会返回隐藏文件夹。是什么赋予了?

macos terminal

3
推荐指数
1
解决办法
4840
查看次数

标签 统计

r ×2

adminlte ×1

bs4dash ×1

geometry ×1

gis ×1

macos ×1

qgis ×1

r-sf ×1

shiny ×1

terminal ×1

wordcloud2 ×1