Skip to content

Instantly share code, notes, and snippets.

@ajp619
ajp619 / poly.Rmd
Created April 19, 2014 05:00
R poly()
### poly
How does poly work?
```{r}
a <- 1:10
# Let's start easy
p <- poly(a, 3, raw=TRUE)
p
# This is easy to reproduce
@ajp619
ajp619 / timer_example.py
Created October 19, 2013 16:17
Quick python timer example
import timeit
def func(x, y):
return x**2 + y**2
def wrapper(func, *args, **kwargs):
"""This enables using a function with arguments with timeit"""
def wrapped():
return func(*args, **kwargs)
R Markdown, Population Sampling, & Confidence Intervals
========================================================
Topics:
* Introduce R Markdown
* **Gain an intuitive understanding of the errors we introduce when we look at subsets of an entire population through:**
* population sampling
* linear models (coefficients, residuals, fitted.values)
* smoothScatter (example)
* confidence intervals