Description Usage Arguments Value Examples
Print tutorial for function/class and return tutorial code as a function. It is a generic function.
1 | tutorial(topic)
|
topic |
tutorial topic, it is usually a function name. |
tutorial code as a function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | {
# access tutorial code for class info
tutorial("info") # use class name string
tutorial(create.info()) # use object
tutorial(create.info) # use function name
tutorial("create.info") # use function name string
tutorial_func <- tutorial("info")
tutorial_func() # run tutorial code, suggest read it first
tutorial("tutorial") # print tutorial to console
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.