influxr_write | R Documentation |
influxr_write
writes a 'data.frame' to influxDB databases.
influxr_write(
client,
x,
measurement,
database,
precision = c("ms", "u", "ns", "s", "m", "h"),
tags = NULL,
timestamp,
timestamp_format = NULL,
timestamp_offset = 0,
tz = ifelse(Sys.getenv("TZ") != "", Sys.getenv("TZ"), Sys.timezone()),
missing = c(NA, Inf),
from = NULL,
to = NULL,
inclusive = FALSE,
exclude_timestamp_cols = TRUE,
...
)
x |
A 'data.frame' that contains the data to be written to the influxDB database. |
precision |
precision of the timestamp. Default to milliseconds 'ms'. |
tags |
A named character vector of tag keys and values 'c(tag_key=tag_value)' pairs to be applied to the uploaded data. Must not contain single quotes or double quotes. See Details on how to escape special characters and on how unescaped special characters are checked for. example ‘tags=(station=’Hainich', level = 3)' |
timestamp |
The timestamp of the data. Can be one of the following:
|
timestamp_format |
character string. Format for converting |
timestamp_offset |
Number of seconds to apply as an offset to the timestamp and file modification times before uploading to database. |
tz |
character. Timezone of the data. Will be used in converting You can specify other timezones, e.g. for time in Germany, do |
missing |
A vector of missing values to be replaced with NULL when uploaded to InfluxDB default to 'c(NA, Inf)'. |
from |
Timestamp in |
to |
Timestamp in |
inclusive |
logical. Whether the upper time limit be interpreted inclusively or not. |
exclude_timestamp_cols |
logical. Whether the column(s) specified in |
Influx Line Protocol prohibits quoting of measurements, tag keys, tag values and field keys. Special characters can nonetheless be escaped with a backslash.
Please note that in R
you need to escape the backslash character itself with another backslash character
when constructing strings. Function writeLines
may be useful when trying to figure out which characters of a string have not been properly escaped.
TRUE
if upload is successful.
strptime
for converting character strings to POSIXt
format.
OlsonNames
for valid time zone names.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.