geckoDatasetCreate: Create a Dataset to be used on Geckoboard

View source: R/geckoDatasetCreate.R

geckoDatasetCreateR Documentation

Create a Dataset to be used on Geckoboard

Description

Create a Dataset to be used on Geckoboard.

Usage

geckoDatasetCreate(df, apiKey, dataset="dummy.by_day", types,
  verbose = FALSE, optional=(types == "number"))

Arguments

df

Data frame. Only column names are used during dataset creation.

apiKey

API key.

dataset

Name the Geckoboard dataset should get, e.g. name.by_day.

types

Either "date", "datetime", "number", "percentage" (between 0 and 1), "string" or "money".

verbose

If TRUE, API repsonse if printed.

optional

Usually numeric fields are optional. Can be modified.

Value

Nothing is returned.

Author(s)

Meinhard Ploner

Examples

## Not run: 
data = data.frame(
  date=c("2018-03-01", "2018-03-02", "2018-03-03", "2018-03-04"), 
	KPI1=c(77, 78.1, 79, NA), 
	KPI2=c(78, 90, 91.2, 92)
)
datasetName = "kpi.by_day"
types = c("date", "number", "number")
geckoDatasetCreate(data, account$apiKey, datasetName, types)
geckoDatasetReplace(data, account$apiKey, datasetName, types)

## End(Not run)

ploner/RGeckoboard documentation built on Oct. 22, 2023, 9:27 p.m.