I'm in the process of learning R and hoped for some clarification on something.
Given this dataframe:
myDataset <- data.frame("IDs" = rep(1:10,each = 5),
"session" = rep(1:5, times = 10),
"IV" = rnorm(50),
"DV" = rnorm(50))
What different uses would calling the first column from this dataframe have based on whether you used one set of brackets:
myDataset[1]
Or two sets of brackets:
myDataset[[1]]
They both give the same information, one in the form of the numbers listed in rows and the other in its original column form.
I'm just trying to understand why I might want to use one over the other.