Learn R Programming

prevR (version 2.1)

plot,prevR-method: Plot object of class prevR.

Description

Method plot for object of class prevR. Plot clusters, number of observations per cluster or number of positive cases per cluster.

Usage

## S3 method for class 'prevR,missing':
plot(x,
     type = "position",
     add.legend = TRUE, 
     legend.location = "bottomright",
     factor.size = 0.2,
     new.window = TRUE, 
     axes = F,
     \dots
    )

Arguments

x
object of class prevR.
type
graph to plot:
  • "position" clusters position.
  • "c.type" clusters perc.type.
  • "count" number of observatios per cluster.
  • "flower" number of positive cases per cluster.
add.legend
add a legend?
legend.location
legend location.
factor.size
scale factor of rings (for type="count").
new.window
plot in a new window?
axes
show axes?
...
additional arguments transmitted to title.

encoding

utf8

Details

Available values for legend.location are: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" use "center". Use main to define a title and sub for a subtitle (see title{graphics}).

See Also

title{graphics}, legend{graphics}.

Examples

Run this code
par(ask = TRUE)
plot(fdhs, type = "position", main="position", new.window=FALSE, axes=TRUE)
plot(fdhs, type = "c.type", main="c.type", new.window=FALSE)
plot(fdhs, type = "count", main="count", factor.size = 0.1, new.window=FALSE)
plot(fdhs, type = "flower", main="flower", new.window=FALSE)
par(ask = FALSE)

Run the code above in your browser using DataLab