Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

R code in Qlik Sense using ggplot2 --- R to Qlik Sense

Hi there,

I am trying to recreate this code in Qlik... everything which is needed is there, except, for some reason I don't know how to modify my R code for Qlik..

R code:

library(ggplot2)

mydata <- read.csv("Mispriced-Diamonds.csv")

ggplot(data = mydata, aes(x = carat, y=price)) + geom_point() + geom_smooth()

my Dimension is: carat

and my Measure...

In Qlik Sense I wrote almost the same (in 10 different variations, on of them...):

R.ScriptEval('library(ggplot2); ggplot(data = q, aes(x = q$carat, y = q$sumprice)) + geom_line()', carat as carat, Sum(price) as sumprice)

Can anyone give me a hint?

Regards

2 Replies
yannick_c
Partner - Contributor III
Partner - Contributor III

Hello Anton,

Are you sure you can use ggplot in Qlik Sense ?

I tought we could used R code only to calculate but not to plot graph (without extention, JSON, ...)

Hope it'll help

Regards

lorenzoconforti
Specialist II
Specialist II

I know it's an old post but I've just published a document on how to easily incorporate ggplot charts in Qlik Sense

https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Qlik-Sense-and-R-integration-ggplot-an...

Lorenzo