Learn R Programming

MSG (version 0.9)

msg: Plot a graph with a pre-installed R script

Description

Plot a graph with a pre-installed R script

Usage

msg(fig = "3.6", show_code = TRUE, print_plot = TRUE, filter = 0)

Value

A graph and the source code

Arguments

fig

Character. The figure number or the R script name, which is given in the book.

show_code

Logical. TRUE means the codes are shown in the console.

print_plot

Logical. TRUE means the graph is printed.

filter

Integer. The line numbers indicating which lines in the code are displayed (when positive) or hidden (when negative).

Examples

Run this code
# msg('3.6') msg('ChinaPop')

Run the code above in your browser using DataLab