dbpf_manual_obs_add: Add manual observations to DB

View source: R/dbpf_manual_obs_add.R

dbpf_manual_obs_addR Documentation

Add manual observations to DB

Description

Tests and optionally inserts one manual observation into DB.

Usage

dbpf_manual_obs_add(
  con,
  sensor_label,
  location_name,
  time_UTC,
  numeric_value,
  text_value,
  height_min_metres,
  height_max_metres,
  mode = "test"
)

Arguments

con

Database connection object, as returned by dbpf_con()

sensor_label

sensor label used to obtain sensor ID [character]

location_name

location name used to obtain location ID [character]

time_UTC

time of observation [POSIXct]

numeric_value

observed value / result [numeric]

text_value

observed value / result [character]

height_min_metres

[numeric]

height_max_metres

[numeric]

mode

Should data be inserted into DB? Defaults to 'test' so that only testing information is returned. To insert: 'insert'

Details

Data is checked for existence (or duplication) of sensor and location and feedback is returned.

Author(s)

Stephan Gruber <stephan.gruber@carleton.ca>

Examples

## Not run: 
con  <- dbpf_con()
data <- dbpf_manual_obs_add(con, sensor_label, location_name, time_UTC,
							value, height_min_metres, height_max_metres,
							insert = FALSE)
dbDisconnect(con)

## End(Not run)

geocryology/PermafrostDB documentation built on April 17, 2025, 11:54 a.m.