[R] A question about plots and lists in functions

Greg Snow Greg.Snow at intermountainmail.org
Wed Jun 20 03:57:28 CEST 2007


-----Original Message-----
From: "Jason Q McClintic" <jqmcclintic at stthomas.edu>
To: "r-help at stat.math.ethz.ch" <r-help at stat.math.ethz.ch>
Sent: 6/19/07 2:04 PM
Subject: [R] A question about plots and lists in functions


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

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
jqmcclintic at stthomas.edu
mccl0219 at tc.umn.edu

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.

More information about the R-help mailing list