Last data update: 2014.03.03

R: Drawing the coverage plot
coverage.plotR Documentation

Drawing the coverage plot

Description

In a case where users closed the default coverage plot that the coverage function generated, the function coverage.plot redraws the coverage plot using the coverage object.

Usage

coverage.plot(cov)

Arguments

cov

Any saved result of the coverage function.

Details

It is possible that a user want to redraw the coverage plot for any reasons. If the result of the coverage function was saved into a variable, this coverage.plot redraw the coverage plot using the saved result.

Value

The coverage plot will be displayed again.

Author(s)

Hyungsuk Tak, Joseph Kelly, and Carl Morris

Examples


  # baseball data where z is Hits and n is AtBats
  z <- c(18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 10, 10, 10, 10,  9,  8,  7)
  n <- c(45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45)

  b <- gbp(z, n, model = "binomial")
  cov <- coverage(b, nsim = 10)  
  coverage.plot(cov)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Rgbp)
Loading required package: sn
Loading required package: stats4

Attaching package: 'sn'

The following object is masked from 'package:stats':

    sd

Loading required package: mnormt
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Rgbp/coverage.plot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: coverage.plot
> ### Title: Drawing the coverage plot
> ### Aliases: coverage.plot
> ### Keywords: methods
> 
> ### ** Examples
> 
> 
>   # baseball data where z is Hits and n is AtBats
>   z <- c(18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 10, 10, 10, 10,  9,  8,  7)
>   n <- c(45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45)
> 
>   b <- gbp(z, n, model = "binomial")
>   cov <- coverage(b, nsim = 10)  
>   coverage.plot(cov)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>