[R] r tidy
George Georgalis
george at galis.org
Thu Jan 25 20:55:05 CET 2007
On Thu, Jan 25, 2007 at 02:35:21PM -0500, George Georgalis wrote:
>
>Here's a script to tidy a file as argument $1
>
>#!/bin/sh
>R --vanilla <<EOF
> options(keep.source = FALSE)
> source("$1")
> dump(ls(all = TRUE), file = "${1}.tidy.R")
>EOF
>
>
>yes, works great, but as one with nearly zero r experience,
>hoping to apply my other language experience to some R spaghetti,
>http://cran.r-project.org/doc/manuals/R-exts.html#Tidying-R-code
>did frighten me off, the first time.
Is there a way to tidy code that is broken? instead of a "best
effort" on broken code, I don't get a dump.
also, what is going on when I try to tidy this
options(keep.source = FALSE)
source("/dev/null")
dump(ls(all = TRUE), file = "/dev/null")
with the code above? ie no output.
// George
--
George Georgalis, systems architect, administrator <IXOYE><
More information about the R-help
mailing list