Description Usage Arguments Details Value See Also Examples
Generate a directory structure which contains ‘demo-*.R’ scripts along with directories containing all available demonstation exercise ‘.Rnw’ or ‘.Rmd’ files and necessary template files (LaTeX, HTML, or XML).
1 2 3 4 5 |
dir |
character with path to directory. The default is the current working directory. |
type |
character vector indicating types of exercises that should be included in the ‘demo.R’ script. By default an example for each type of exercise is included. |
writer |
character vector indicating the |
markup |
character vector indicating whether the example exercises
use |
absolute |
logical. Should the paths in the ‘demo.R’ script be absolute? The default is to use relative paths. |
encoding |
character specifying the encoding to be used in the
|
exams_skeleton
(or equivalently exams.skeleton
) creates a
directory with several ‘demo-*.R’ scripts illustrating the use of the various
exams2xyz
interfaces. Subdirectories with copies of all demonstration
exercise .Rnw
or .Rmd
files and templates for different output formats
(LaTeX, HTML, or XML) are also created.
This should provide a starting point for users wishing to start their own collection of exercises with exams.
The encoding
is not used by default. In principle, it can be set to
any value that Sweave
can work with in the current locale. If set to
"UTF-8"
(or "utf8"
), or "ISO-8859-1"
(or "latin1"
),
or "ISO-8859-15"
(or "latin9"
), the LaTeX and/or HTML templates
are adapted accordingly. For other encodings the templates may need further
touch-ups.
exams_skeleton
returns a list of character vectors with the demo scripts
invisibly.
exams2html
,
exams2pdf
,
exams2moodle
,
exams2qti12
,
exams2qti21
,
exams2arsnova
,
exams2nops
1 2 3 4 5 6 7 8 9 10 11 12 | ## output directory (replace this with "/path/to/your/directory")
mydir <- file.path(tempdir(), "myexam")
## create exams skeleton with absolute paths in demo.R
exams_skeleton(dir = mydir, absolute = TRUE)
## look at created files
dir(mydir)
dir(mydir, recursive = TRUE)
## now open demo-all.R or any of the other demo-*.R scripts in your
## favorite R code editor and run the examples...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.