Skip to Content
0

Regrading custom R component - output issue

Jun 27, 2017 at 07:23 AM

47

avatar image
Former Member

Hi

I wrote a custom R component using "gplots" packages to result print out result,but sometimes the output charts became so small to cause we can't see it very clear.

please see the attached snapshotas below. (code1, font is big,but can't see the all content;

code2: font is small,but we can't see it very clear)

Has anyone ever had problems like this? Did you have any idea how to fix this bug ? I Wanna to know how to adjust parameter or option in custom R component. Thanks for your reading.

code 1:

fit.c = capture.output(summary(fit, fit.measures = TRUE)) library(gplots) textplot(fit.c,cex=2)

擷取2.jpg

code 2:

fit.c = capture.output(summary(fit, fit.measures = TRUE)) library(gplots) textplot(fit.c)

擷取.jpg

擷取2.jpg (63.3 kB)
擷取.jpg (42.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Andreas Forster
Jul 05, 2017 at 02:49 PM
0

Hi Perry,

If you need to output more than the standard summary, you could try splitting the text over multiple charts.

The comments on this post include an example

https://blogs.sap.com/2015/03/10/custom-r-component-normal-distribution-test/

I think would be nice to have the option to have the command line output displayed on an additional output tab. That would give a lot of flexibility. If you like that approach or if you have another idea how to display that text, it would be a great addition to the ideas place, where customers can suggest prodcut enhancements.

https://ideas.sap.com/PredictiveAnalytics

Many Greetings

Andreas

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

ok, got it. I would check the package code that you mentioned and check whether there is a good solution?

Your kindness is much appreciated.

0
Andreas Forster
Jun 28, 2017 at 04:57 PM
0

Hi Perry,

the summary of the model does not have to be displayed in the chart window.

Just tick "Show Summary" and the model's summary will be nicely displayed as text.

Many Greetings

Andreas


summary.png (36.4 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 29, 2017 at 07:33 AM
0

Hi Andreas Forster,

Yeah, I know that set the option show-summary could print out the summary result right.There is a question how can I do when I want to set more parameter in summary ? For instance, you can find the fit summary result when code1 run but code2 doesn't work. The point is

the content in bracket of summary must be a model such as lm.,aov, etc.., but I want to show a result don't meet this rule so that I use textplot function to show it. Moreover, sometimes I am not going to show a summary, summary function you mention above is no useful in the moment. As far as I am concerned,how to configure textplot parameter in PA to fit screen out is very important for all the PA user especially for someone who want to create lots of custom R component in PA. Thanks for your reading, awaiting your quick response.

code1:

fit = lm (y~x)

return(list(XXX=fit))

code2:

fit = lm (y~x)

fit2= (fit,fit.measures = TRUE)

return(list(XXX=fit))

Share
10 |10000 characters needed characters left characters exceeded