The RStudio integrated development environment (IDE) was first released in 2011. The goals of its creators, so far as I can tell, were these. First, they wanted to provide a better R coding experience than could be had through the bare-bones text editor that shipped with R itself. They also wanted to take into account the fact that many new users of R had no previous programming experience, and so had no familiarity with the kinds of tools that support efficient coding workflows. The RStudio IDE was intended to provide a relatively simple unified interface to R, its command line, help system, and plots. It eventually expanded to include limited interfaces to command line utilities like (e.g.,) git and pandoc, which can usefully supplement an R based workflow. Importantly, RStudio was geared toward novice programmers who might be coding only in R.
That said, there are other IDEs that will get the job done. Many of these are more general purpose tools, supporting a number of programming languages beyond R (as
Given a yaml block like this:
---
title: My Data Summary (DRAFT)
subtitle: Fall 2019 Data
author: David Braze
institute: Haskins Laboratories
date: "`r format(Sys.time(), '%B %d, %Y')`"https://cran.r-project.org/web/packages/ggrepel/
"Provides text and label geoms for 'ggplot2' that help to avoid overlapping text labels.
Getting the right tables for a project can be fiddly in R, both for content and format. What I really prefer is clean separation between functions for generating content of a table, from those to do with its formatting. I am often, but not always, working in the context of an rmarkdown based workflow. There, fine control over format details will usually require making use of tools peculiar to the output type of the document (pdf, html, etc). This can complicate things a bit.
These methods and tools are primarily about getting table content right.
| ##### Basic factor level ordering and (treatment) contrasts | |
| ## set up data.frame with 1 continuous variable and 1 factor with 8 levels. | |
| set.seed(1234) | |
| x <- rnorm(80) | |
| fac <- factor(rep(LETTERS[8:1], 10)) | |
| df <- data.frame(x, fac) | |
| df$x[as.integer(df$fac) %% 5 == 0] <- rnorm(10, 1) | |
| head(df, 16) ## Note the order of factor levels in this data is reverse |
| lmerTest:: satterthwaite df estimation | |
| pbkrtest:: kenward-roger df estimation; also parametric-bootstrap per Judd, Westfall & Kenny (2012) | |
| mertools:: provides prediction intervals for parameters estimates in lme4 models. | |
| semTools:: supplements lavaan. | |
| mcmcglmm:: bayesian mixed models. | |
| glmmPQL:: | |
| plotmcmc:: | |
| GLMM FAQ: |
| library(tidyverse) | |
| ## toy fixation report | |
| fixations <- tibble(fixidx=as.integer(1:3), start=c(100,250,372), end=c(202, 348, 426), | |
| x=sample(0:1000,3), y=sample(0:1000,3)) | |
| ## convert to long format | |
| fixations <- fixations %>% | |
| gather(start, end, -c(fixidx,x,y)) %>% | |
| arrange(fixidx) %>% |
| p <- seq(0,1,.05) | |
| odds <- p/(1-p) | |
| logOdds <- log(odds) | |
| cbind(p, odds, logOdds) | |
| ## p odds logOdds | |
| ## [1,] 0.00 0.000000 -Inf | |
| ## [2,] 0.05 0.052632 -2.94444 | |
| ## [3,] 0.10 0.111111 -2.19722 |
| library(car) | |
| library(Hmisc) | |
| library(perturb) | |
| n <- 200 | |
| x0 <- rnorm(n) | |
| x1 <- rnorm(n) | |
| x2 <- x1 + rnorm(n)/2 | |
| x3 <- x2 + rnorm(n)/1.25 |