Learn R Programming

ptvapi (version 2.0.5)

assert_correct_attributes: Assert that the API has returned the expected attributes

Description

The attributes returned by the API calls should be follow the API schema. This function compares received attributes against a vector of expected attributes, and returns an error if the two do not match. Unfortunately, there is no easy fix for this error: the package developer(s) must be notified, so that they can align the functions against the API schema.

Usage

assert_correct_attributes(received_attributes, expected_attributes)

Value

An error if the column names are not as expected.

Arguments

received_attributes

A character vector of attributes, in order.

expected_attributes

A character vector of expected attributes, in order.