2012年2月21日星期二

data manipulation - transform() and mutate()

http://r.andrewredd.us/?p=58

1. transform is a generic function, which—at least currently—only does anything useful with data frames. transform.default converts its first argument to a data frame if possible and calls transform.data.frame.



2. mutate, of plyr package. This function is very similar to transform but it executes the transformations iteratively so that later transformations can use the columns created by earlier transformations. Like transform, unnamed components are silently dropped.

没有评论:

发表评论