Examples for 'sfheaders::sf_point'


sf POINT

Aliases: sf_point

Keywords:

### ** Examples


x <- c(1:3)
sf_point( x )
  geometry
1  1, 2, 3
x <- matrix( c(1:10) , ncol = 2 )
sf_point( x )
  geometry
1     1, 6
2     2, 7
3     3, 8
4     4, 9
5    5, 10
x <- setNames( as.data.frame( x ), c("x","y") )
sf_point( x )
  geometry
1     1, 6
2     2, 7
3     3, 8
4     4, 9
5    5, 10
sf_point( obj = x, x = "x", y = "y" )
  geometry
1     1, 6
2     2, 7
3     3, 8
4     4, 9
5    5, 10
sf_point( obj = x, x = "y", y = "x" )
  geometry
1     6, 1
2     7, 2
3     8, 3
4     9, 4
5    10, 5
# keeping properties
x$val <- letters[1:5]
sf_point( x, x = "x", y = "y", keep = TRUE )
  val geometry
1   a     1, 6
2   b     2, 7
3   c     3, 8
4   d     4, 9
5   e    5, 10

[Package sfheaders version 0.4.4 Index]