create_results_columns: Create or Delete Results - Columns

Description Usage Arguments Details Value Examples

Description

post_results_records will upload a data frame with the correct specification for the fields uploaded. You can use this function to add columns manually if preferred, especially if a non-standard column type.

Usage

1
create_results_columns(auth, table_id, columns)

Arguments

auth

Highbond authentication credentials, created from setup_highbond

table_id

The ID number of the table

columns

A data frame with columns to be added

Details

When creating columns, the argument will accept a data frame. This data frame must only have three columns - field_name, display_name, and data_type. See API for allowable data_type.

When deleting columns, the argument will accept a data frame. This data frame must only have one column - field_name

Value

If creating or updating, a data frame with the new details. When deleting, JSON response indicating success or failure.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
  auth <- setup_highbond(Sys.getenv('highbond_openapi'), 
    Sys.getenv('highbond_org'), 
    Sys.getenv('highbond_datacenter'))
    
  field_name <- c("a", "b", "c", "d", "e", "f", "g")
  display_name <- c("field_one", "field_two", "field_three", 
    "field_four", "field_five", "field_six", "field_seven")
  data_type <- c("character", "numeric", 'logical', 
    'date', 'datetime', 'file', 'digital_signature')
  columns <- data.frame(field_name, display_name, data_type)
  
  table_id <- 12345
  response <- create_results_columns(auth, table_id, columns)

## End(Not run)

galvanizer documentation built on May 28, 2021, 5:14 p.m.