Installing R/exams

September 8, 2017
By

(This article was first published on R/exams, and kindly contributed to R-bloggers)

1. R

The R/exams system is an extension for the
R system for statistical computing and hence the
first installation step is the base R system.

  • Windows and (Mac) OS X: Go to https://CRAN.R-project.org/, the
    Comprehensive R Archive Network (CRAN). Simply
    click on the link for your operating system and at least install the “base”
    system. It is recommended to also install the accompanying “Rtools” which are
    not needed immediately but might useful at some stage.
  • Linux: While it is possible to download from CRAN by hand, it is
    easier for most distributions to install the packaged binary. For example,
    on Debian/Ubuntu:

    apt-get install r-base-core r-base-dev
    

There is a wide variety of interfaces for using R including simply the shell,
Emacs, or dedicated graphical user interfaces for Windows and OS X, respectively.
Moreover, RStudio is an open-source cross-platform integrated development
environment that facilitates many common tasks for R beginners.

2. R package “exams”

The core of R/exams is the open-source R package
“exams”, also available from CRAN.
It can be easily installed interactively from within R with a single command.
If necessary, the development version of the package is also available, which
may provide some new features or small improvements.

  • Stable version:

    install.packages("exams", dependencies = TRUE)
    
  • Development version:

    install.packages("exams", repos = "http://R-Forge.R-project.org")
    

Details: Several additional R packages, automatically installed by the command above,
are needed for certain tasks: base64enc (HTML-based output: Base64 encoding of
supplements), knitr (R/Markdown-based exercises), png (NOPS exams: reading
scanned PNG images), RCurl (ARSnova: posting exercises), RJSONIO (ARSnova:
JSON format), rmarkdown (pandoc-based conversion), tth (HTML output from
R/LaTeX exercises).

3. LaTeX

For producing PDF output, the typesetting system LaTeX is used internally by R/exams.

  • Windows: Go to http://www.MikTeX.org/ and click on “Download” to obtain
    the MikTeX distribution for Windows.
  • (Mac) OS X and Linux: LaTeX distributions are available in the standard
    repositories and can be installed in the “usual” way, typically using the
    TeX Live distribution.

4. Pandoc

For certain conversions performed internally in R/exams, specifically when
Markdown is involved, the universal document converter
pandoc is employed. If you have installed RStudio, then
pandoc is provided along with it and nothing else needs to be done.

Otherwise pandoc can be obtained from its web page (linked above) or standard repositories,
e.g., for Debian/Ubuntu:

apt-get install pandoc

Optional: Further scanning tools

Note: Unless you want to process written NOPS exams
from scanned PDF files, this section can be skipped.

If the scanned images of written NOPS exams (from your photocopier) are in PDF format,
they need to be converted to PNG first using the PDF Toolkit pdftk and
ImageMagick’s convert.

Make sure everything works

To check that the software from Steps 1-4 works, try to run some examples from the
exercise template gallery, e.g., dist or
ttest.

To leave a comment for the author, please follow the link and comment on their blog: R/exams.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)