[R] Manipulations of a data frame or list -- rename or re-assign?

Ben Harrison harb at student.unimelb.edu.au
Sat Aug 3 13:27:39 CEST 2013


If I am to do a lot of pre-processing operations on some data,
comprising many steps such as:

-- despike a set of signals
-- smooth a set of signals
-- filter
-- subset
-- impute missing values

etc... Should I be assigning the result of each operation to a new
object, and then destroying the old one, or is it fine to reassign the
object to itself?

df <- sapply(df, someFunction, arg=10)
OR
df.new <- sapply(df, someFunction, arg=10)

Ben
University of Melbourne



More information about the R-help mailing list