rp.deleteline {rpanel}R Documentation

Removes a line from an rpanel image

Description

This removes a previously drawn line which was given an id in rp.line.

Usage

rp.deleteline(panel, image, id)

Arguments

panel

the panel containing the image. This may be passed as a panelname string or the panel object itself.

image

the image on which the line was drawn.

id

the identifier of the line to be deleted.

Value

If the parameter panel is the panelname string the same string is returned. If the panel object is used the altered panel is assigned to both the calling level and panel's environment level.

References

rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.

Examples

if (interactive()) {
   panel <- rp.control()
   image.file <- file.path(system.file(package = "rpanel"), "images", "gulllmks.gif")
   rp.image(panel, image.file, id = "gulls.image")
   rp.line(panel, gulls.image, 10, 10, 100, 100, color = "green", id="first")
   rp.line(panel, gulls.image, 100, 100, 100, 10, color = "blue", id="second")
   rp.deleteline(panel, gulls.image,"first") # deletes only the first line leaving the vertial blue one.
   }

[Package rpanel version 1.0-6 Index]