[R] A question about plots and lists in functions

From: Jason Q McClintic <jqmcclintic_at_stthomas.edu>
Date: Tue, 19 Jun 2007 15:02:08 -0500


I tried googling and couldn't find anything.

I have a function I am sourcing into R that does some calculations to generate a simulated dataset. I currently have a a list set up to store the outputs from the function and a plot of one of them (a set of ordered pairs) like this:

## do some work here ##

     plot=plot(output1[,1],output1[,2],type=p)); }

The problem I am having is that when I do


it will show the plot, but I would like to be able to repeatedly call it like I can call the different plots in an lm without having to display everything else too (in some cases, output1 could be a 50K by 2 matrix, rather inconvenient to keep having it display that over and over again to get a graph).

Thanks in advance,

Jason Q. McClintic

Jason Q McClintic

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 19 Jun 2007 - 20:07:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Jun 2007 - 20:33:57 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.