GoogleTrain <-
function(auth_token, mybucket, mydata) {
h = basicTextGatherer()
b = basicTextGatherer()
curlPerform(url = paste("https://www.googleapis.com/prediction/v1.1/training?data=", mybucket, "%2F", mydata, sep=""),
customrequest = "POST",
httpheader = c(Authorization = paste("GoogleLogin auth=", auth_token, sep = ""), 'Content-Type' = "application/json"),
postfields='{\"data\":{}}',
headerfunction = h$update,
writefunction = b$update
)
junk <- list(status = parseHTTPHeader(h$value()), body = b$value())
return(fromJSON(junk$body))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.