Learn R Programming

FAOSTAT (version 1.6)

tsPanel: Function to plot data by country and time

Description

A function exploring the trend od the variable by country and over time.

Usage

tsPanel(Data, country, year, var, smoother = "lm",
    ncol = 10, facetScales = "free_y",
    ylab = substitute(var), xlab = "Year")

Arguments

Data
The data frame containing the data
country
The column name containing the country name.
year
The columne name containing the time information.
var
The variable to be examined.
smoother
The type of smoothing to be used, refer to stats_smooth() for available options.
ncol
Number of columns for the matrix panel
facetScales
Controls the axis of the facets, refer to facet_wrap() for more detail.
ylab
The y-axis label.
xlab
THe x-axis label.