Learn R Programming

genvar (version 0.0.2.0)

gvplot: convenience interface to R's plot command

Description

Executes a plot command in genvar's environment so that gvplot(xvar,yvar) will plot a scatter plot of the variables xvar and yvar in the genvar enviroment.

Usage

gvplot(...)

Arguments

...

arguments to be passed to R's plot command.

Value

returns NULL, invisibly

Examples

Run this code
# NOT RUN {
library(plm)
data(Produc)
use(Produc, clear=TRUE)
gen(laborforce, emp/(1-unemp/100))
empfrac = function (emp, laborforce) sum(emp)/sum(laborforce)
collapse("empfrac(emp,laborforce)", year)
rename(empfrac(emp, laborforce), empfrac)
destring(year)
gvplot(year, empfrac, type="b", main="Employment Percentage over Time",
xlab="Year", ylab="Employment Percentage", pch=19)
# }

Run the code above in your browser using DataLab