Learn R Programming

matRiks (version 0.1.3)

hide: Hide figures (Method)

Description

Change the visibility of a figure from 1 to 0

Usage

hide(obj, index)

Value

The starting object with a hidden figure

Arguments

obj

A figure composed of different figures

index

integer, the index of the element to hide

Examples

Run this code
# concatenate three figures into an object
my_shapes <- cof(square(), triangle(), slice())
# draw object
draw(my_shapes)
# hide the triangle
draw(hide(my_shapes, 2))

Run the code above in your browser using DataLab