influx_select: influx select helper

Description Usage Arguments Value References

View source: R/influxdb_select.R

Description

This function is a convenient wrapper for selecting data from a measurement by calling influx_query with the corresponding query.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
influx_select(
  con,
  db,
  field_keys,
  rp = NULL,
  measurement,
  where = NULL,
  group_by = NULL,
  limit = NULL,
  slimit = FALSE,
  offset = NULL,
  order_desc = FALSE,
  return_xts = TRUE,
  simplifyList = FALSE
)

Arguments

con

An influx_connection object (s. influx_connection).

db

Sets the target database for the query.

field_keys

Specifies the fields to be selected.

rp

The name of the retention policy.

measurement

Character vector containing name(s) of the measurement(s).

where

Apply filter on tag key values.

group_by

The group_by clause in InfluxDB is used not only for grouping by given values, but also for grouping by given time buckets.

limit

Limits the number of the n oldest points to be returned.

slimit

logical. Sets limiting procedure (slimit vs. limit).

offset

Offsets the returned points by the value provided.

order_desc

logical. Change sort order to descending.

return_xts

logical. Sets the return type. If set to TRUE, a list of xts objects is returned, FALSE gives list of tibbles.

simplifyList

logical. If only one series is returned, the result can be flatten to directly get either a tibble or an xts object (instead of a list) (default is FALSE).

Value

A list of xts or tibbles. Empty query results yield to NULL.

References

https://docs.influxdata.com/influxdb/


dleutnant/influxdbr documentation built on May 8, 2020, 12:43 p.m.