Skip to content

st_perimeter works in R, but not with knitr #98

@josephholler

Description

@josephholler

I've got the st_perimeter() function working fine in RStudio running Rmarkdown chunks one by one, but when I try to knit the Rmd file to html using Knitr, it throws an error:

error in `st_perimeter_lwgeom()`:
! for perimeter of longlat geometry, cast to LINESTRING and use st_length

I'm using lwgeom_0.2-14 on Windows and the CRS of the simple features is epsg:4269.

The work-around to cast to LINESTRING and use st_length does work, and gives the same result as st_perimeter() run from the code chunk.
I'm mostly curious why st_perimeter() might work while running code chunks, but not while knitting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions