Format a File of Expressions

DESCRIPTION:

Formats a file of expressions according to standard S-PLUS deparse format.

USAGE:

S.format(infile, outfile=tempfile("Sexpr"))

REQUIRED ARGUMENTS:

infile
character string naming an existing file containing S-PLUS expressions.

OPTIONAL ARGUMENTS:

outfile
character string naming a file where the formatted expressions should be written.

VALUE:

the character string outfile.

SIDE EFFECTS:

the expressions in infile are written to outfile in standard S-PLUS deparse format, using the current width and length options. It is a good practice to observe a standard format when communicating one's source code to other users.

WARNING:

This function uses sink, so it will wipe out any sink that is in effect.

SEE ALSO:

, , , , .

EXAMPLES:

edit myfile     # write S-PLUS statements into myfile
S.format("myfile", "myfile2")     # equivalent statements, nice format