Curriculum
Course: Basic Quantitative Analysis with R and E...
Login
Text lesson

Unit 2.1: How to Create a Cross-tabulation in R

In this unit, you will learn how to create a cross-tabulation in R. You can use the following codes provided below to practice with the video lesson. Please note that the code needs to be adjusted according to the file name and variable name that you have.

Code 1: table(filename$variablename)

Code 2: table(filename&variablename, filename$variablename)

Code 3: view(table(filename$variablename, filename$variablename))

You can download the Excel files here:

File 1: Nutrition

File 2: data for r

Layer 1
Login Categories