View source: R/dbpf_device_add.R
dbpf_device_add | R Documentation |
Adds a new device to DB and tests for duplicate device_type and serial_number.
dbpf_device_add(
con,
device_type,
notes,
serial_number = "",
access_code = "",
manufacturer = "generic device",
manufacturer_device_name = "",
acquired_on = "1950-01-01 00:00:00+00",
mode = "test"
)
con |
Database connection object, as returned by |
device_type |
Charcter string decribing type of device |
notes |
Notes for the device. |
serial_number |
Serial number, must be unique |
access_code |
Access code (used with Geoprecision loggers) |
manufacturer |
Manufacturer. |
manufacturer_device_name |
Device type as used by manufacturer. |
acquired_on |
Date when device was purchased (format: "1950-01-01 00:00:00+00") |
mode |
= Can be 'test' (default, read-only) or 'insert' (will insert into DB) |
Run in test mode first. If you have no DB login to write data, run in test mode with your login and then pass to someone who does.
Test results as well as device id if data was inserted.
Stephan Gruber <stephan.gruber@carleton.ca>
Hannah Macdonell <hannah.macdonell@carleton.ca>
## Not run:
con <- dbpf_con()
dbpf_device_add(con, "MyDev", "Test", serial_number = "Test",
access_code = "", manufacturer = "generic device",
manufacturer_device_name = "",
acquired_on = "1950-01-01 00:00:00+00", mode = 'test')
dbDisconnect(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.