get_study_fields: Get Study Fields

View source: R/get_study_fields.R

get_study_fieldsR Documentation

Get Study Fields

Description

This function takes a search expression and character vector with any number of field names and returns one dataframe with the merged and parsed csv API response.

Usage

get_study_fields(
  search_expr,
  fields,
  max_studies = 500,
  response_content = FALSE
)

Arguments

search_expr

A string following the querying guidelines at https://clinicaltrials.gov/api/gui/ref/syntax and https://clinicaltrials.gov/api/gui/ref/expr

fields

A character vector with field names. All field names available at https://clinicaltrials.gov/api/info/study_fields_list?fmt=JSON, with "all_fields", or with "get_vector_all_study_fields()"

max_studies

A number indicating how many studies of all the ones that match the search expression will be returned.

response_content

Logical indicating whether the returned object is the unparsed but decoded, content of the API query response. Will only return first 20 fields in fields argument. Suited for troubleshooting.

Examples

get_study_fields(expr = 'heart attack',fields = all_fields)

AdlCruz/rctapi documentation built on Jan. 28, 2024, 8:15 p.m.