[R] Function to modify existing data.frame

Marc Schwartz MSchwartz at MedAnalytics.com
Tue Jan 18 16:31:33 CET 2005


On Tue, 2005-01-18 at 10:18 -0500, Peter Muhlberger wrote:
> I'm used to statistical languages, such as Stata, in which it's trivial to
> pass a list of variables to a function & have that function modify those
> variables in the existing dataset rather than create copies of the variables
> or having to replace the entire dataset to change a few variables.  In R, I
> suppose I could paste together the right instructions in a function and then
> execute it, but is there any more straightforward way of doing this I'm
> missing?
> 
> Thx,
> 
> Peter


What type of modifications?

Take a look at:

?replace
?transform

HTH,

Marc Schwartz




More information about the R-help mailing list