Function in R for Word and Line Count Table

Here I present a new function I created to find the count of lines and words in a text document and return them in the form of a table. It uses the wc “qdap” package in R as well as base R functions sum, nrow, as.numeric, and cbind. The Problem: How to find both the number of lines and the amount of words in a potentially large document using R