0

I am new to RStudio, and my goal is to create a new table that sums each category (of Application status) from the raw data sample. I have looked to similar questions to this, but I got even more confused. I have provided the code below (I know it's wrong). I appreciate all the help! Any resources for RStudio is greatly appreciated as well.

Raw Data Sample:

Student_ID Application_Status0
1 Verified
2 Complete
3 Not Complete
4 Verified
5 Complete
6 Not Compete
7 Complete
8 Verified

Desired Table:

Application_Status # of Students
Verified 100
Complete 209
Not Complete 385

Code (in chunk):


```{r}
df
sum(df$Student_ID)
sum(df$Application_Status0)

df1=as.table()

df1
 
thelatemail
  • 91,185
  • 12
  • 128
  • 188
mq19745422
  • 73
  • 5
  • Try `aggregate(Student_ID ~ Application_Status0, df1, length)`. This is definitely a duplicate but I'm not find it right now. – Rui Barradas Sep 28 '22 at 03:47
  • I tried both methods. Unfortunately, it did not work for me. I got errors: "The table does not coerce". I am sure there is a very similar question that may answer my question, but I do not see it either. – mq19745422 Sep 28 '22 at 04:09
  • Please edit your question with the output of `dput(head(df))` or just `dput(df)`, someone will be able to answer immediately. – diomedesdata Sep 28 '22 at 04:28
  • 1
    Try this: `table(df$Application_Status0)` – IRTFM Sep 28 '22 at 06:39

0 Answers0