Learn R Programming

RSiteCatalyst (version 1.4.16)

GetMetrics: Get Available Metrics within a Report Suite

Description

Gets valid metrics for current user, valid with optionally specified existing metrics, elements and date granularity

Usage

GetMetrics(reportsuite.ids, metrics = c(), elements = c(),
  date.granularity = "", report.type = "")

Arguments

reportsuite.ids

Single report suite id, or character vector of report suite ids

metrics

List of existing metrics you want to use in combination with an additional metric

elements

List of existing elements you want to use in combination with an additional metric

date.granularity

Granularity that you want to combine with an additional metric

report.type

If set to 'warehouse', the elements and metrics returned to use in combination with an addional element are supported in data warehouse reports.

Value

Data frame

Details

This function requires having a character vector with one or more valid Report Suites specified.

Examples

Run this code
# NOT RUN {
metrics.valid <- GetMetrics("your_report_suite",
                            metrics=c('visitors','pageviews'),
                            elements=c('page','geoCountry'),
                            date.granularity='day',
                            report.type=''))

metrics <- GetMetrics(report_suites$rsid)
# }

Run the code above in your browser using DataLab