Mehrad :kde: :emacs: :rstats: on Nostr: Does anyone know how to pass a PNG or JPG from R to stdout? At the moment I'm ...
Does anyone know how to pass a PNG or JPG from R to stdout? At the moment I'm creating a tempfile and returning the filename, but that's suboptimal and makes the code less clear.
R has `stdout()` but none of the `png()` or `jpg()` support writing to connection.
#RStats
Published at
2026-05-19 21:35:32 CESTEvent JSON
{
"id": "00af4ddd348e2000479424b5203ff0bad92622a5a49195cbca9ccc5e019ef519",
"pubkey": "c9eedd006de948c8c225e5736ed0a6ac4387b23993f88ae28a48a36ed71a74cf",
"created_at": 1779219332,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/@Mehrad/116602918196837759",
"web"
],
[
"t",
"rstats"
],
[
"proxy",
"https://fosstodon.org/users/Mehrad/statuses/116602918196837759",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://fosstodon.org/users/Mehrad/statuses/116602918196837759",
"pink.momostr"
],
[
"-"
]
],
"content": "Does anyone know how to pass a PNG or JPG from R to stdout? At the moment I'm creating a tempfile and returning the filename, but that's suboptimal and makes the code less clear.\n\nR has `stdout()` but none of the `png()` or `jpg()` support writing to connection.\n\n#RStats",
"sig": "02ee6aaa0d9da5d474727c9d0ece6c83c8a784f7b020c244005b0c11e1153d0661513b2e7cf5920c0a20951cc149a67fac19cd0b8538b5991161246ec1c45082"
}