Add Protocol Based on Existing Protocol
add_protocol_based_on.Rd
add_protocol_based_on()
adds a new protocol to the protocol lookup table based on an existing protocol.
Use this instead of add_protocol
in case you have a new protocol that varies just slightly from existing one.
Usage
add_protocol_based_on(
con,
based_on,
new_name,
commit = FALSE,
software_version = NULL,
reader_type = NULL,
reader_serial_number = NULL,
plate_type = NULL,
set_point = NULL,
preheat_before_moving = NULL,
runtime = NULL,
interval = NULL,
read_count = NULL,
run_mode = NULL,
excitation = NULL,
emissions = NULL,
optics = NULL,
gain = NULL,
light_source = NULL,
lamp_energy = NULL,
read_height = NULL
)
Arguments
- con
A DBI connection object obtained from DBI::dbConnect()
- based_on
A valid protocol name, this protocol must exist.
See also
Other protocol functions:
add_protocol()
,
delete_protocol()
,
get_protocols()
,
update_protocol()
,
update_protocol_status()
Examples
# example database connection
cfg <- config::get()
con <- DBI::dbConnect(RPostgres::Postgres(),
dbname = cfg$dbname,
host = cfg$host,
port = cfg$port,
user = cfg$username,
password = cfg$password)
#> Error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
#> Is the server running on that host and accepting TCP/IP connections?
#> connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
#> Is the server running on that host and accepting TCP/IP connections?
# update the software version
add_protocol_based_on(con, based_on = "existing protocol", software_version = "2")
#> Error in eval(expr, envir, enclos): object 'con' not found