Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have attached the R code and it is working absolutely fine in R Gui.
But when I imported it into Power BI, it is not working. Please help me with this.
x<-c(0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5,16.5,17.5,18.5)
y<-c(60.62259458,470.1189752,865.3944386,1130.487698,1242.078749,1210.563709,1071.719665,872.8184187,658.8630463,463.2443228,304.3777303,187.3412277,108.2011552,58.7199621,29.97392294,14.40326246,6.519647521,2.781426084,1.118883814)
logfunction1<-log(x)
for(l in 1: (length(x)))
{
if(l==1)
{
b[l]<-y[l]
}
else{
b[l]<-b[l-1]+y[l]
}
}
print(b)
m<-max(b)
d<-1:19
for(l in 1: (length(x)))
{
d[l]<-(b[l]-0.3)/(m+0.4)
}
print(d)
logfunction2<-1:19
for(l in 1: (length(x)))
{
logfunction2[l]<-(log(log(1/(1-d[l]))))
}
print(length(logfunction2))
print(length(logfunction1))
e<-summary(lm.r)$coefficients[2]
f<-summary(lm.r)$coefficients[1]
alpha<-(exp(-f/e))
print(alpha)
beta<-e
print(beta)
z<-dweibull(x,beta,alpha,log = FALSE)
plot(x,z, type="b",col = "red", xlab="x value", ylab="Density", main="Comparison of t Distributions")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.