You Hyun Jo
2009-Sep-26 06:26 UTC
[R] Is there any performance difference between subset() and list comprehension?
Hello, Suppose that you have a data frame 'df' with variables 'V1', 'V2', 'V3', etc. Is there any (performance) difference (except the difference of the return types) between the following two computations? subset(df, V1 > 0, V2) and df$V2[df$V1 > 0] Best Regards, hyunjo [[alternative HTML version deleted]]
Stefan Grosse
2009-Sep-26 08:56 UTC
[R] Is there any performance difference between subset() and list comprehension?
On Sat, 26 Sep 2009 15:26:12 +0900 You Hyun Jo <youhyunjo at gmail.com> wrote: YHJ> Is there any (performance) difference (except the difference of YHJ> the return types) YHJ> between the following two computations? Try it yourself. ?system.time is useful for that purpose. Stefan