Closed kurpav00 closed 4 years ago
only the final line of an expression gets automatically printed. In your last example that means that it is the result of dev.off()
that gets printed. If you want explicit printing instead of relying on the automatic printing of the REPL you should put the statement in print()
(e.g. print(s())
)
Note that this has nothing to do with svglite, but is simply standard R behaviour
Hello.
I am experiencing a weird bug when using the svgstring function. If I run the following code, a string representation of the resulting chart in svg format gets printed to the console as expected:
However, if I embed the svgstring call into an if-else statement, the svg string does not get printed:
I fail to comprehend why this is happening. I would be very grateful for a way to fix or at least circumvent this issue. The inability to use svgstring in a conditional statement makes it pretty useless...
Thank you in advance for your help.