Let get into reshaping some data with using the reshape2
package. Install that package now with install.packages("reshape2")
and load it with library(reshape2)
.
A word of caution: don't confuse the reshape2
package with the reshape
function in base R - they are unrelated.
Next, download and import the two datasets we will be practicing with: the hare-lynx trapping data set and the familiar loci/image/rhyme memory experiment data.
hares <- read.csv("http://wjhopper.github.io/psych640-labs/data/hare_lynx.csv") memory <- read.csv("http://wjhopper.github.io/psych640-labs/data/memorydata.csv")
If you have not read the "Data Semantics" slides, I strongly recommend you go back and read those before continuing on.