Skip to content

Commit

Permalink
README.md: updated to reflect that getRs and knitrSet are now in Hmisc
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Harrell committed Sep 2, 2015
1 parent bd38a92 commit 19cc646
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# rscripts
### R Scripts: Templates, Examples of Analyses using `knitr` with `Rmarkdown` or `LaTeX`, Interactive `RStudio` Demonstrations | [Contents Directory](https://github.com/harrelfe/rscripts/blob/master/contents.md)

This is for use with the R function `getRs` (included in the `.Rprofile` file mentioned below) for auto-populating an RStudio script editor window with a script stored here. Windows users must install `wget` in order to access github because it uses https instead of http. Installation instructions as well as an attachment containing `.Rprofile` are [here](http://biostat.mc.vanderbilt.edu/RConfiguration).
This is for use with the R function `getRs` in the R `Hmisc` package for listing available scripts, downloading a selected script, and opening it in the RStudio script editor window.

The special file `contents.md` lists all the available files and short descriptions for them. It should not be edited, as it is auto-generated by `createContents.r`. `contents.md` is used when `getRs` is called with no arguments, to give the user a list of available scripts and their descriptions.

The `Rmarkdown` and `LaTeX` scripts included here use a template that makes the result part of a reproducible research process by documenting the versions of R and attached packages at the end of the report. They make use of the `knitrSet` function also defined in the `.Rprofile`. When running Rmarkdown, call `knitrSet(lang='markdown')`. `knitrSet` gets rid of ## at the start of R output lines, and makes it easy to specify things like figure sizes in `knitr` chunk headers. It also causes annoying messages such as those generated from attaching R packages to be put in a separate file `messages.txt` rather than in the report.
The `Rmarkdown` scripts included here use a template that makes the result part of a reproducible research process by documenting the versions of R and attached packages at the end of the report. They make use of the `Hmisc` package's `knitrSet` function. When running Rmarkdown, call `knitrSet(lang='markdown')`. `knitrSet` gets rid of ## at the start of R output lines, and makes it easy to specify things like figure sizes in `knitr` chunk headers. It also causes annoying messages such as those generated from attaching R packages to be put in a separate file `messages.txt` rather than in the report.

`contents.md` is generated from titles, major and minor categories, and types (R, R Markdown) that are at the top of each script. R Markdown scripts must have suffix `Rmd` and have the following information between lines containing `---` and after the `output:` section: `major`, and `minor` (optional). Scripts that fall under multiple categories have those category descriptions separated by semicolons. See `descriptives.Rmd` for an example. Regular R scripts must have suffix `r` and have the following in the top lines of the script (again, `minor` is optional):

Expand All @@ -17,7 +17,7 @@ The `Rmarkdown` and `LaTeX` scripts included here use a template that makes the

See `introda.r` for an example.

Possible values for major categories are listed below.
Some possible values for major categories are listed below.

|*Major Category*|*Comments*|
--------|--------
Expand All @@ -30,7 +30,7 @@ Possible values for major categories are listed below.
| statistical tests | |
| ABD | Problems from _Analysis of Biological Data_, 2nd edition, by Whitlock and Schluter |

Possible values for minor categories are listed below.
Some possible values for minor categories are listed below.

|*Minor Category*|*Comments*|
--------|--------
Expand All @@ -39,4 +39,3 @@ Possible values for minor categories are listed below.
| categorization | |

To request the addition of new categories open an issue for this GitHub project.

0 comments on commit 19cc646

Please sign in to comment.