I am trying to get the mode from my dataset, this is the code I have entered:
library(modest)
mode(AgeFromFirstDataSet$Age)
mode_age <- mode(AgeFromFirstDataSet$Age)
However I am only being given this back:
[1] "numeric"
On one occasion I was also given the following in red text:
Registered S3 method overwritten by 'htmlwidgets':
method from
print.htmlwidget tools:rstudio
[1] "numeric"
I have since got rid of the above message about "Registered S3 method...", but still can not get anything but "numeric" as my mode. I was able to get the mean, median, sd and se without issue, but can only seem to get this answer for the mode. Am I using the wrong code? / What may I be doing wrong that produces numeric for mode, even though I get results for the other four?
I apologise if this seems trivial or poorly explained, but I am very new to R. Thank you.