Skip to main content
Skip to McMaster Navigation Skip to Site Navigation Skip to main content
McMaster logo

Data Frames and Vectors

Data Frames and Vectors

Vectors are sequences of data of the same datatype, and they are the fundamental unit we use for analysis in R and other statistical programs. When vectors are combined, we get data frames where the columns are the different variable we are looking at and the rows present unique values/observations. Understanding and manipulating vectors and data frames is a key skill for quantitative analysis.


Resource:Vectors & Data frames – R for reproducible scientific analysis (Software Carpentry) 

Type: Tutorial 
Who it’s for: People who have some familiarity with R and are getting started with data analysis 
Why we love it:This tutorial walks you through some powerful and important things you can do with your data in R and helps you understand how programs like R ‘read’ data. Topic covered include intro to vectors, creating vectors, vectorization, intro to loading external data, intro to data frames, accessing a data frame, and subsetting. 


Resource:Creating a Data Frame from Vectors in R Programming (GeeksforGeeks) 

Type: Article 
Who it’s for: People looking for an introduction to combining vectors to form data frames in R? 
Why we love it:This resources helps you move from individual vectors to data frames and provides a helpful introduction to the data.frame() function.