From: Christophe Rhodes Date: Wed, 6 Apr 2011 07:48:33 +0000 (+0100) Subject: experiment with different printing methods (using swank-media) X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=35777b8090bd582463898e0a6431c578e0f65789;p=swankr.git experiment with different printing methods (using swank-media) --- diff --git a/swank-media.R b/swank-media.R index 6e81dbb..686a636 100644 --- a/swank-media.R +++ b/swank-media.R @@ -16,4 +16,20 @@ makeMediaReplResult.trellis <- function(value) { deparse(value$call, nlines=1)) } +makeMediaReplResult.numeric <- function(value) { + string <- paste(deparse(value), sep="", collapse="\n") + list(quote(`:write-string`), string, quote(`:repl-result`)) +} +makeMediaReplResult.complex <- function(value) { + string <- deparse(value) + list(quote(`:write-string`), string, quote(`:repl-result`)) +} + +makeMediaReplResult.array <- function(value) { + makeMediaReplResult.default(value) +} +makeMediaReplResult.matrix <- function(value) { + makeMediaReplResult.default(value) +} + makeReplResultFunction <- makeMediaReplResult