Hello,
i have the following problem.
I have data (daten). I calculate via the sixsigma package a result. The result (
img <- process.capability(q1, spec.limits=c(UGW,OGW))
) makes a plot.
If i make an api call with "post" with this img row everything is working fine.
If i want to manipulate the plot via saving the file and then manipulate the file via the magick package, i will always get the message
"The device output file is missing. Did you produce an image?"
It seems to me, that i cannot return a specific image file via plumber, Is this correct or how could i avoid this behaviour?
Thanks for your help
#* Example of customizing graphical output
#* @serializer png list(width = 400, height = 500)
#* @param a daten for calculation
#* @parser json
#* @post /png_hans_json
function(req, a){
daten <- c("16","23","20","21","21.5","19","19","20.4","18.3","19.9","18.7","18","17.7","19.1","19.7","18.1","18.4","17.5","18.9")
#daten <- unlist(a)
laengedaten <- length(daten)
werte<-as.numeric(daten)
werte<- na.omit(werte)
UGW<-werte[1]
OGW<-werte[2]
werte <- werte[3:laengedaten]
q1= qcc(werte, type = "xbar", std.dev = sd(werte), plot=TRUE)
#png(tempfile())
img <- process.capability(q1, spec.limits=c(UGW,OGW))
#dev.off()
#The device output file is missing. Did you produce an image
}