Quick-R, one of the friendliest R places on the web, with many handy things including a reminder of what all those graphical parameter codes lead to. Though for adjusting margins I always like this page.
Master Jim Regetz shared his amazing R primerwith me, so I am passing it along to the rest of the world. There is much amazing about this primer, including the eternal wisdom of: ‘There is really no reason you should ever have to struggle through something alone in R’ and much more.
Down with for loops! Or so they all say, here’s how to remember the applies.
Types of sums of squares: Make sure you know which you’re using, want type III? Try the car package or check out your options(contrasts) or magically always have a perfectly balanced design. Also consider why you want which type you want.
Switching a column from factor to numeric? Be sure to ask for as.numeric(as.character(myfactorcolumn)) when you do. Better yet you can start all your code with: options(stringsAsFactors=FALSE) and prevent R from going all factor-crazy.
Annoyed that lmer doesn’t have p-values? Read this.
Hadley Wickham has made my R skills in many ways old, and out of date. To catch up on the present I challenge myself to watch this video where Hadley tells us how to manage many models in R. Info on purr here. And there are great cheatsheets from R Studio on wrangling dataand using ggplot, and adjusting ggplot themes.
Other R things I aim not to forget: choosing colors (including the viridis), trouble-shooting and getting help in R.
LaTeX & Sweave
Detexify: By far the most brilliant resource, draw your symbol and code options come up.
LaTeX and Sweave: Eli Holmes’ workshop on LaTeX: Super easy friendly and useful directions to get LaTeX running on your machine — and then get Sweave running, with some basic instructions for getting your coding life in LaTex and Sweave going. Start with “files to download” and get the Sweave files. Then work through the Sweave files under the tabs, set-up, lecture, and exercises.
Wrapfig: I am always looks for suggestions on making wrapfig and I play better together. One I heard recently: “If you want your picture to wrap a paragraph, put the wrapfig environment in front of it and leave some blank lines after the wrapfig environment in your source.” And, using floats in posters.
LaTeX wikibook: So many of your questions answered in one place.
Sweave: Once you have it installed and know LaTeX and R, there’s not much to it, but I did lead a workshop on some of the basics (files here on git, or here). You can also download the manual, you can also download it directly from here. Friedrich Leisch is the author of Sweave and used to maintain a good set of FAQs (I will keep an eye out for its return). I also recommend Charlie Geyer’s page here as a good resource. (And if somehow you missed it, read up four paragraph for my recommendation of Eli Holmes’ site on Sweave & LaTeX.)
LaTeX to rtf: Small, simple and sweet, just install yourself and call latex2rtf “myfilepath” at the command line.
Beamer! Now that you know LaTeX you can start making all your presentations in Beamer and start making animated pdfs.
Word to LaTeX: Great little tool to export Open Office docs to LaTeX. Just download the program, then in Open Office, go to Tools -> Extension Manager and add the new extension (.oxt) and poof! Like magic you can now export all your docs to LaTeX. I will say that it is UGLY code, but it’s good to get you started. You can open a new tex doc and pull out the good chunks.
White space in LaTeX: LaTeX’s formatting is so lovely that initially you wonder why anyone would mess with it, and then a grant is due and you’re looking for every trick in the book. You can still get a lot of the pretty and trim space by using a slew of tricks including using smaller font in the main text and refs, and some of these tricks including trimming that linespread, and then if you’re still desperate check out what the engineers at Cambridge or the general UK TeX folks suggest. Happy page limiting.
Cleaning up intermediate files: When compiling your code LaTeX vomits up a bunch of ugly intermediate files. There’s lots of ways to get rid of them, for emacs AucTex will allow you toss them. After compiling use the command (after C-c C-c) ‘Clean’ to toss them or ‘Clean All’ to toss them plus the output files.You can also customize disposal however you like (for example, don’t trash them, put them somewhere you define etc.).
LaTeX can be a bit of pain in letter format, you can add numbers, and you can add a bibliography; it’s just not pretty.
How to add S to all your supplemental tables and figures? Put this towards the top of your file somewhere after begin{document}: renewcommand{thetable}{Sarabic{table}} renewcommand{thefigure}{Sarabic{figure}}
Sudo, etc.
My favorite text editor is Aquamacs. I use it for R, LaTeX and most other stuff. This page has some hints and here’s more good info.
Trying to get certain files on github to display properly? Try replacing the file link with github.com to rawgit.com. This is a third-party server that can display html files, among other things.
I have not tried these but a few more links people might find useful: Packages that help you use Stan without coding in Stan, also here (note: do not try to look at Stan code created by rstanarm, it won’t help you learn Stan). How to do an RM-ANOVA in Stan. And Max Farrell’s workshop on Stan (including rstanarm) from April 2017 here. Bayesian for hackers
Two wise people told me people go to grad school for a total sum of seven reasons (I went for two of them); here’s a post though on a 100 reasons not to go and Ms Mentor’s perspective on it. For those going, here are the names of some grants to consider:
I am convinced my friend Kim Nicholas set off a spate of interest and information in how to review (articles, generally) with her 2011 article in EOS, A Quick Guide to Writing a Solid Peer Review. You can read a follow-up from Nature here. There’s also the lovely, though rather giant, British Ecological Society’s Guide here. And ask around.
Stuff by Robert Boice is also good, such as the writing section of Advice for New Faculty Members, it shows some graphs in case you still want to believe spontaneous writers write better.
Made to Stick by the Heath brothers is not written as well as I would like, but all the points are valid and not put together so well anywhere else (that I am aware of).
Of course there’s always Wiliiams’ Style: Lessons in Clarity & Grace (and the much smaller ‘Basics’ edition, often excellent for students) and the Chicago Manual of Style for arguments about whether you can capitalize a word after a semi-colon, plus they have a Manual for Writers of Research Papers, Theses and Dissertations that is handy.
Loehle’s classic on creativity in science compares your ideas to a zoo of animals, in a very good way.