我不确定这是否是sf中的错误但是我无法获得sf初始消息以便在Rmarkdown中显示。我已经使用了我所知道的每一个命令来试图让响应变得沉默:
```{r echo=FALSE, cache=FALSE, results=FALSE, warning=FALSE, comment=FALSE, warning=FALSE}
不会在Rmarkdown中阻止此消息
Simple feature collection with 10 features and 9 fields
geometry type: POLYGON
dimension: XY
bbox: xmin: -80.13852 ymin: 39.65424 xmax: -75.20251 ymax: 42.18098
epsg (SRID): 4326
proj4string: +proj=longlat +datum=WGS84 +no_defs
添加comment = FALSE行实际上会在每行添加单词“FALSE”
FALSE Simple feature collection with 10 features and 8 fields
FALSE geometry type: POLYGON
FALSE dimension: XY
FALSE bbox: xmin: -8920979 ymin: 4815823 xmax: -8371505 ymax: 5188128
FALSE epsg (SRID): 3857
FALSE proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
答案 0 :(得分:0)
使用invisible(capture.output(*code*))
使简单要素的输出静音。