0

I have this data and I want to figure out a way to know how many ones and how many zeros are in each column (ie Arts and Crafts). I have been trying different things but it hasn't been working. Does anyone have any suggestions?

data

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63

1 Answers1

0

You can use the table() function in R. This creates a categorical representation of your data. Additionally here convert list to vector I have used unlist() function.

df1 <- read.csv("Your_CSV_file_name_here.csv")
table(unlist(df1$ArtsAndCrafts))

If you want to row vice categorize the number of zeros and ones you can refer to this question in Stackoverflow.

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63