Sometimes it is convenient to have the data in the same file as the computation in R. Further complications arise that text files often have irregular number of columns or empty columns. Reading such data with read.table() into R is accomplished in the following way:

r = read.table(sep='\n', stringsAsFactors = FALSE,
text = "ORDER DATE
STATUS
SOURCE
DELIVERY MODE
ORDER NUMBER
AMOUNT
06/22/2017")
# get all the dates
grep('^\\d{2}',r$V1)
The text can then be parsed separately and saved in a data.frame() object. 

 

Documentation is essential for any R package to be used over time. The followin R-packages, I developed, still need a website documentation,which can be easily developed with teh pkgdown R script.

Currently, my packages are described using a markdown README file, see:

- QuantumPPMS package

- X-ray Rigaku package

- Atomic force microscopy image analysis package

Yihui Xie wrote an extensive book on markdown language in R, it is called R Markdown: The Definitive Guide. Conversion to Powerpoint files is also useful.