Quantcast
Viewing all articles
Browse latest Browse all 217217

Same R script, different results

I tried the below R script in two different places on PowerBI but it gives me a different results

on Get Data > R script, the following R script returns a dataset that I can explain and eventually parse JSON format.

On the other hand, when applying this on Run R Script within Transform - it doesnt return any dataset that I can do further transformation. Basically returns no rows. What have I done wrong? Please find R script below. Note that I took away my API key Image may be NSFW.
Clik here to view.
Smiley Happy
- Many thanks

 

# 'dataset' holds the input data for this script
library(rosetteApi)

key <- "content"
value <- "It is a beautiful day"
parameters <- list()
parameters[[ key ]] <- value
parameters <- toJSON(parameters)
result = api("my api", "sentiment", parameters)
myjson <- toJSON(result)

dataset <- as.data.frame(myjson)

 


Viewing all articles
Browse latest Browse all 217217

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>