Using R for statistics
The Basics-
Data Tables
— A good guide to getting started with data.tables
-
Making and Using Lists
— Everything I could find about lists in R.
-
Read Files Function
— a short function I wrote that will read all files in a directory and give them the same name in the global environment.
-
Creating New Variables
— Creating variables, categories, binary variables, factors. Cutting data into those categories.
-
Editing Text Variables
— Using grep, grepl, gsub, sub, and strsplit to modify character strings.
-
Managing Data Frames with dplyr
— Subset and reshape data using dplyr
-
Merging Data
— How to merge two data sets using merge and plyr
-
The apply series: apply, lapply, sapply, tapply
— Using the apply series to run a function across a matrix.
-
Reshape
— Using Reshape to transform data and plot it.
-
Dates and times: POSIXct & POSIXlt
— Dates and times using POSIXct and POSIXlt
-
Working With Dates
— Using date() and lubridate to create dates.
-
Filling In An Area Under A Curve
— Using ggplot2 to plot a curve and then color in a section of the plot.
-
Multiplot
— Using the multiplot function with ggplot2
-
Reinstall R packages during R reinstall
— An easy way to reinstall R packages when reinstalling R.
-
Finding Peak Values For a Density Distribution
— Use density and other tricks to find the high and low points in a distribution
-
Central Limit Theorem
— What is the Central Limit Theorem. Sample Means. Other stuff.
-
Coin Toss Probability
— The probability of winning 19 out of 25 coin tosses.
-
Confidence Intervals When Sigma Is Known
— Confidence Intervals and Sample Size
-
Confidence Intervals Part 2: Using T-Distributions When Sigma Is Unknown
— Confidence Intervals T-Distributions, Beer.
-
Confidence Intervals Part 3: Confidence Intervals With Proportions
— Proportons and Sample Size
-
Confidence Intervals Part 4: Using the Chi-Squared Distribution
— Sample Size and Confidence Intervals for Standard Deviation and Variance
-
Binomial Distribution
— use the binom series of commands and plot binomial distributions with the base graphing package and ggplot2
-
Hypergeometric Distribution
— Calculating distributions without replacement.
-
Hypothesis Testing Part 1
— Testing the difference between two samples.
-
Linear Regression
— Finding Linear Regressions, using cor, cor.test, lm, predict, and confint.
-
Multinomial Distribution
— Distributions with more than two outcomes.
-
Normal Approximation to the Binomial Distribution
— Find a binomial probability with a continuous distribution
-
Normal Distribution
— Finding z-scores, using norm and tigerstats functions
-
Permutations and Combinations
— Using R to create permutations and combinations
-
Poisson Distribution
— Working with poisson distributions.
-
Poisson Distribution Example
— An example with horses
-
Two Way ANOVA
— Two Way ANOVA by hand and using R
-
PM 2.5 Emissions
— Using the maps package to display emissions data on a map.
-
PM 2.5 Emissions - Part 2
— Using the maps package to display emissions data on a map.