% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/count_words.R
\name{countwords}
\alias{countwords}
\alias{count_words}
\alias{count_words2}
\title{A function for counting words in an Rmarkdown document.}
\usage{
count_words(file)

count_words2(file)
}
\arguments{
\item{file}{A path to a .Rmd file}
}
\value{
A scalar representing the number of words in the document.
}
\description{
This function takes a path to a .Rmd file and returns a word count.
For best results each sentence should start on a new line.
Inline code chunks should also start on a new line.
}
\examples{
rmarkdown::draft(file = "test", template = "html_vignette",
package = "rmarkdown", create_dir = TRUE, edit = FALSE)
iheiddown::count_words("test/test.Rmd")
unlink("test", recursive = TRUE)

}
