# NOT RUN {
# Create a connection object.
connection = connect_mstr(base_url, username, password, project_name)
# Create a report object.
my_report <- Report$new(connection, report_id)
# See attributes and metrics in the report.
my_report$attributes
my_report$metrics
my_report$attr_elements
# Specify attributes and metrics (columns) to be fetched.
my_report$apply_filters(attributes = my_report$attributes[1:2],
metrics = my_report$metrics[1:2])
# See the selection of attributes, metrics and attribute elements.
my_report$selected_attributes
my_report$selected_metrics
my_report$selected_attr_elements
# Clear filtering to load a full dataset.
my_report$clear_filters()
# Fetch data from the Intelligence Server.
my_report$to_dataframe()
# See the dataframe.
my_report$dataframe
# }
Run the code above in your browser using DataLab