It looks like not all of the packages required for mosaic were installed. Try running
install.packages("ggformula")
You might also have to do
install.packages("stringi")
Finally, the tally function I am familiar with is not used in the way you are using it. From what package does tally come?