June 2017
Beginner to intermediate
576 pages
15h 22m
English
Now that the data has been read, switch over to the console window. At the console prompt, enter the command table(df$Pain). This function will give you the raw counts of the number of patients who did or did not experience pain:
> table(df$Pain)
This is the output that will appear in the console window:
0 1 35 25
The prop.table function will supply you with the percentages of reported pain:
> prop.table(table(df$Pain))
This is the following output:
0 1
0.5833333 0.4166667