A brief introduction to “apply” in R (via What You’re Doing Is Rather Desperate)

好文,好态度,学R就得这么学!

At any R Q&A site, you'll frequently see an exchange like this one: Q: How can I use a loop to […insert task here…] ? A: Don't. Use one of the apply functions. So, what are these wondrous apply functions and how do they work? I think the best way to figure out anything in R is to learn by experimentation, using embarrassingly trivial data and functions. If you fire up your R console, type "??apply" and scroll down to the functions in the … Read More

via What You're Doing Is Rather Desperate

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s