Description Usage Arguments Examples
Examine a random set of rows from a table, or a table subset
1 2 |
x |
A database connection or a query result. |
table |
A specific table within the database (if |
column |
A specific column within a |
n |
The number of rows to return |
clean |
Should |
randomize |
Should the rows be a random sample from the larger dataset? |
setseed |
A value between |
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 | ## Not run:
# Connect to a database:
library(RPostgreSQL)
library(geodiveR)
con <- dbConnect(drv = "PostgreSQL",
user = "postgres",
password = "postgres",
host = "localhost",
port = "5432",
dbname = "deepdive")
skim(con, 'sentences')
# Using the results of a gddMatch:
coords <- gddMatch(con,
table = 'sentences',
col = 'words',
pattern = '[\\{,][-]?[1]?[0-9]{1,2}\.[0-9]{1,}[,]?[NESWnesw],',
name = "decdeg",
rows = TRUE)
DT::datatable(skim(coords, setseed=0.5, clean = 'replace'), )
dates <- gddMatch(con,
table = 'sentences',
col = 'words',
pattern = paste0('(\\d+(?:[.]\\d+)*),((?:-{1,2})|(?:to)),',
'(\\d+(?:[.]\\d+)*),([a-zA-Z]+,BP),'),
name = "decdeg",
rows = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.