Skip to content

Instantly share code, notes, and snippets.

@okraskaj
Last active June 19, 2020 22:35
Show Gist options
  • Save okraskaj/1dad76f058118430cf71ae23fd736a6e to your computer and use it in GitHub Desktop.
Save okraskaj/1dad76f058118430cf71ae23fd736a6e to your computer and use it in GitHub Desktop.
install.packages("influxdbr")
library(dplyr)
library(influxdbr)
library(xts)
con <- influx_connection(
scheme = c("http", "https"),
host = "",
port = 8086,
user = "janek",
pass = "haaaaaaslo-wiesz-jakie",
)
result <- influx_query(
con,
db = "IoF",
query = 'SELECT time, sensorID, value FROM AirPressure LIMIT 100',
timestamp_format = c("n", "u", "ms", "s", "m", "h"),
return_xts = FALSE,
chunked = FALSE,
simplifyList = TRUE
)
result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment