Progress package

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sat Nov 3 16:48:43 GMT 2018


Hi,

On Sat, 03 Nov 2018 13:04:44 +0100
Pierre de Villemereuil <pierre.de.villemereuil at mailoo.org> wrote:
> The dev is asking whether there is a way to detect RKWard. Is there?

well, as far as I can see, the function in question is
progress:::is_supported. That checks if the output stream isatty().
(Not sure, whether this even works on Windows, but so what).

Perhaps a better check would be something like:

  (is_stdout(stream) || is_stderr(stream)) && interactive()

Untested, but might work without adding a special case for every single
GUI out there.

(I suppose the main intention of the check is to avoid writing progress
bars to a file. But in that case, R is either not interactive() -
esp. when there is a shell-redirection - or a sink() is in place.
progress:::is_stdout() seems to check for the latter, already).

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20181103/f050e1e4/attachment.sig>


More information about the rkward-devel mailing list