I'm wondering if anyone can give some basic advice about how to approach a
specific task in R.

I'm new to R but have used SAS for many years, and while I can muscle
through a lot of the code details, I'm unsure of a few things.


Specific questions:

If I have to perform a set of actions on a group of files, should I use a
loop (I feel like I've heard people say to avoid looping in R)?

How to get means for "by" groups and subset a files based on those (subset
highest and lowest groups)?  (I can do this in multiple steps* but wonder
what the best, "R way" is to do this.)

How to draw cutoff lines at specific points on density plots?

How to create a matrix of plots?  (Take 4 separate plots and put them into a
single graphic.)


* Get group means, add means back to file, sort by mean, take first and last
groups



Feel free to excoriate me if I'm asking for too much help.  If possible
though, a few words of advice (loops are the best way, just use the "main"
parameter to combine plots) would be lovely if you can provide.



Thanks!

	[[alternative HTML version deleted]]

