Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dbWriteTable

Write sf object to Database


Description

Write sf object to Database

Write sf object to Database

Usage

## S4 method for signature 'PostgreSQLConnection,character,sf'
dbWriteTable(
  conn,
  name,
  value,
  ...,
  row.names = FALSE,
  overwrite = FALSE,
  append = FALSE,
  field.types = NULL,
  binary = TRUE
)

## S4 method for signature 'DBIObject,character,sf'
dbWriteTable(
  conn,
  name,
  value,
  ...,
  row.names = FALSE,
  overwrite = FALSE,
  append = FALSE,
  field.types = NULL,
  binary = TRUE
)

Arguments

conn

DBIObject

name

character vector of names (table names, fields, keywords).

value

a data.frame.

...

placeholder for future use.

row.names

Add a row.name column, or a vector of length nrow(obj) containing row.names; default FALSE.

overwrite

Will try to drop table before writing; default FALSE.

append

Append rows to existing table; default FALSE.

field.types

default NULL. Allows to override type conversion from R to PostgreSQL. See dbDataType() for details.

binary

Send geometries serialized as Well-Known Binary (WKB); if FALSE, uses Well-Known Text (WKT). Defaults to TRUE (WKB).


sf

Simple Features for R

v0.9-8
GPL-2 | MIT + file LICENSE
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Roger Bivand [ctb] (<https://orcid.org/0000-0003-2392-6140>), Etienne Racine [ctb], Michael Sumner [ctb], Ian Cook [ctb], Tim Keitt [ctb], Robin Lovelace [ctb], Hadley Wickham [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Kirill Müller [ctb], Thomas Lin Pedersen [ctb], Dan Baston [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.