-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.Rhistory
More file actions
39 lines (39 loc) · 1.7 KB
/
Copy path.Rhistory
File metadata and controls
39 lines (39 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
data()
data("Nile")
Nile
save(mydata, "mydata.Rda")
save(mtcars, "mydata.Rda")
mtcars
save(mtcars, "mydata.Rda")
library(sf)
read_sf(system.file("sqlite/test3.sqlite",package="sf"))
read_sf(system.file("sqlite/test3.sqlite",package="sf"), "HighWays")
read_sf(system.file("sqlite/test3.sqlite",package="sf"), "Regions")
read_sf(system.file("sqlite/test3.sqlite",package="sf"), "Towns")
towns <- read_sf(system.file("sqlite/test3.sqlite",package="sf"), "Towns")
# saves the object to an R generic CSV, which can be imported with "read_csv"
write_csv(towns, "towns.csv")
library(readr)
# saves the object to an R generic CSV, which can be imported with "read_csv"
write_csv(towns, "towns.csv")
# saves the object to an R generic CSV, which can be imported with "read_csv"
write_sf(towns, "towns.csv")
# saves the object to an R generic CSV, which can be imported with "read_csv"
st_write(towns, "towns.csv", layer_options = "GEOMETRY=AS_XY")
# saves the object to an R generic CSV, which can be imported with "read_csv"
st_write(towns, "towns.csv", layer_options = "GEOMETRY=AS_XY")
# saves the object to an R generic CSV, which might not be appropriate for
# geospatial data
st_write(towns, "towns.csv")
# saves the object to an R specific file, which can be imported with "load"
load("towns.Rda")
# saves the object to an R specific file, which can be imported with "load"
save(towns, file = "towns.Rda")
# saves the object to an R specific file, which can be imported with "load"
load("towns.Rda")
# saves the object to an R generic CSV, which might not be appropriate for
# geospatial data. CSVs can be imported with "read_csv()"
read_csv("towns.csv")
write_csv(towns, "towns.gpkg")
st_wrtie(towns, "towns.gpkg")
st_write(towns, "towns.gpkg")