Snippets of code for things you do all the time in R
4dpiecharts.com
Snippets of code for things you do all the time in R
1–10 of 14 posts
Re: Snippets of code for things you do all the time in R
#2Re: Snippets of code for things you do all the time in R
#3shameless plug: My book R Graph Cookbook is out soon - https://www.packtpub.com/r-graph-cookbook/book . It contains recipes for doing things with graphs, which can sometimes be obscure, annoying and time consuming.
(if there already is on the site you linked to, sorry for being obtuse).
Re: Snippets of code for things you do all the time in R
#4shameless plug: My book R Graph Cookbook is out soon - https://www.packtpub.com/r-graph-cookbook/book . It contains recipes for doing things with graphs, which can sometimes be obscure, annoying and time consuming.
Interesting - do you have a sample chapter you can make public? (if there already is on the site you linked to, sorry for being obtuse).
Re: Snippets of code for things you do all the time in R
#5Re: Snippets of code for things you do all the time in R
#6Re: Snippets of code for things you do all the time in R
#7Clearly more a comment for an R forum, but why the hell does anybody bother using '<-' instead of '='? Are you trying to obfuscate?
Simple example to show when '=' won't work but '
system.time(vec1
And to demonstrate that you need to use '=' for argument passing: x
[1] Type help('=') at an R prompt, or view it online: http://stat.ethz.ch/R-manual/R-patched/library/base/html/ass...[2] http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
edit: clarified statement.
edit: added examples.
Re: Snippets of code for things you do all the time in R
#8Clearly more a comment for an R forum, but why the hell does anybody bother using '<-' instead of '='? Are you trying to obfuscate?
Using ' The operator ‘ That being said, some R community members still use '=' for assignment, but it's frowned upon. It certainly annoys me when I see it in R code. Simple example to show when '=' won't work but ' system.time(vec1 And to demonstrate that you need to use '=' for argument passing: x [1] Type help('=') at an R prompt, or view it online: http://stat.ethz.ch/R-manual/R-patched/library/base/html/ass... [2…
Do you have an example of where it would be required to use '<-'? Not just median(x <- 10), but a use in which there no simple '=' alternative.
Re: Snippets of code for things you do all the time in R
#9Clearly more a comment for an R forum, but why the hell does anybody bother using '<-' instead of '='? Are you trying to obfuscate?
Re: Snippets of code for things you do all the time in R
#10Earlier quoted context omitted.
Using ' The operator ‘ That being said, some R community members still use '=' for assignment, but it's frowned upon. It certainly annoys me when I see it in R code. Simple example to show when '=' won't work but ' system.time(vec1 And to demonstrate that you need to use '=' for argument passing: x [1] Type help('=') at an R prompt, or view it online: http://stat.ethz.ch/R-manual/R-patched/library/base/html/ass... [2…
I am of the opposite opinion, but perhaps I can be converted. Do you have an example of where it would be required to use '<-'? Not just median(x <- 10), but a use in which there no simple '=' alternative.