title: Unable to upload to Watson Analytics data with R
body: <p>I have the following code:</p>
  
  <pre><code>curl -v -X PUT -H "X-IBM-Client-Id:YOUR_CLIENT_ID" -H "X-IBM-Client-Secret:YOUR_CLIENT_SECRET" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type:text/csv" https://api.ibm.com/watsonanalytics/run/data/v1/datasets/ID_OF_DATA_SET/content -d "YOUR_DATA"
  </code></pre>
  
  <p>That code is the example they gave me in order to upload data, when I try to translate the to R it looks like this: 
  I am using the following libraries: 
  library(RCurl)
  library(RJSONIO)
  library(XML)
  library(httr)
  library(readr)</p>
  
  <p>and the code looks like :</p>
  
  <pre><code>Upload_data&lt;-PUT( url = "https://api.ibm.com/watsonanalytics/run/data/v1/datasets/DataID/content",
                add_headers('Content-Type' = 'text/csv'),
                add_headers('Accept'= 'application/json'),
                add_headers('X-IBM-Client-Secret' = Secret),
                add_headers('X-IBM-Client-Id' = Client),
                add_headers('Authorization: Bearer'=Auth, body= "Province,Population density,Area,Population,
                            Ontario,97,83858,8169929
                            Quebec,337,30510,11007020
                            Alberta,111,547030,63601002
                            Manitoba,233,357021,81799600
                            British Columbia,393,41526,16824400
                            Costa Rica, 1,10000, 1000000"))
  </code></pre>
  
  <p>Seems that it is not working, do you know some way to fix it?</p>