R has three subset operators: [, [[, and $. Given data frame df, both of these return a data frame: df["z"], df[3]. Given a data frame df, all three of these commands are identical and return a vector: df$z, df[["z"]], df[[3]].
David's script is here: https://github.com/bionicturtle/youtube/tree/master/r-intro
David's script is here: https://github.com/bionicturtle/youtube/tree/master/r-intro
Last edited: