Re: [R] r tidy

From: George Georgalis <george_at_galis.org>
Date: Thu 25 Jan 2007 - 19:55:05 GMT

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><

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Jan 26 07:00:53 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 25 Jan 2007 - 20:30:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.