Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] API Example Code in R

Scott Keating sjk3001 at
Fri Mar 10 10:39:42 PST 2017


I am trying to get the annotator to work using the R programming system. The API Documentation found here<> states that sample code can be found in other languages. Do you happen to have example code written in R that I might be able to use as a reference? I am attempting to annotate patient electronic health record data for symptoms of adverse drug events using the diabetes ontology. When I run my code it states "Error: Bad Request", which I assume has something to do with my API key, which I have verified as correct and properly linked to my account. Any pointers?

Bellow you can find the R-code I have already established with help from various internet sources:

url <- ""
resultDF <- NULL
results_list <- NULL
text <- readLines("C:/Users/SJK3001/Desktop/text.txt")
apikey <- "fbcd9b23-1a86-4e1d-9af2-ac417482bdef"

for (sentence_id in 1:length(text)) {
  curr_sentence <-
    as.character(text[sentence_id]) # current sentence to process
  cat("#", sentence_id, "from", length(text),
      ":", curr_sentence, "\n")
result <- postForm(url,
                   #"include" = "all"
                   "mappings"= "all",

Thank you for your help!

Scott Keating
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list