OpenTSDB / opentsdbr

Pull data from OpenTSDB into R
39 stars 20 forks source link

Name clash? #7

Open llarsson opened 9 years ago

llarsson commented 9 years ago

I am not an R programmer, but it seems that due to a naming clash, this software fails to start.

This is the output when I try to run even the example query from the README.md file:

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(opentsdbr)
Loading required package: stringr
Loading required package: httr
Loading required package: lubridate
Loading required package: data.table
data.table 1.9.4  For help type: ?data.table
*** NB: by=.EACHI is now explicit. See README to restore previous behaviour.

Attaching package: ‘data.table’

The following objects are masked from ‘package:lubridate’:

    hour, mday, month, quarter, wday, week, yday, year

> metric <- "SHT15_temp_Celsius"
> start <- ISOdate(2013, 02, 02, 00, tz="America/Los_Angeles")
> (result <- tsd_get(metric, start, tags=c(site="*"), downsample="10m-avg"))
Error: is.interval(interval) is not TRUE

To me (again, not an R programmer), this looks like it could be related to something like this:

http://stackoverflow.com/questions/30249863/lubridate-objects-masked-after-loading-data-table

Can someone with any modicum of R skills see if there is an easy solution to this?

sanblch commented 8 years ago

There is an error in readme.md, hope it will be fixed. Your log shows that ISOdate(2013, 02, 02, 00, tz="America/Los_Angeles") is not an interval. See this issue #8. This issue should be closed.