~ Class: ParWindows ~

Share:

Description

ParWindows is an objet containing graphical parameter used to set the screen display.

Slots

nbCol

[numeric]: Number of column of the screen matrix.

nbRow

[numeric]: Number of row of the screen matrix.

addLegend

[logical]: Shall a legend be added on the graph?

closeScreen

[logical]: On exit, high level plot function can either close the screen that they open and return nothing ; or not close it and return the list of the screen number.

screenMatrix

[matrix(numeric)]: Matrix with 4 column defining the screen region, like the figs argument of the function screen. The screenMatrix can be specified by the user (bad idea) or can be compute automaticaly according to nbCol, nbRow and addLegend. For that, use windowsCut.

Construction

Object ParWindows can be created by the constructor parWindows or by the function windowsCut.

Methods

object['xxx']

Get the value of the field xxx.

object['xxx']<-value

Set the field xxx to value.

Author

Christophe Genolini
1. UMR U1027, INSERM, Universit<e9> Paul Sabatier / Toulouse III / France
2. CeRSME, EA 2931, UFR STAPS, Universit<e9> de Paris Ouest-Nanterre-La D<e9>fense / Nanterre / France

References

[1] C. Genolini and B. Falissard
"KmL: k-means for longitudinal data"
Computational Statistics, vol 25(2), pp 317-328, 2010

[2] C. Genolini and B. Falissard
"KmL: A package to cluster longitudinal data"
Computer Methods and Programs in Biomedicine, 104, pp e112-121, 2011

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
### Building ParWindows
(paramWin <- parWindows(3,2,FALSE,TRUE))

### Get
figsScreen <- paramWin['screenMatrix']

### Usage
listScreen <- split.screen(figsScreen)
screen(listScreen[1])
plot(-5:5/10,2.5-(-5:5)^2/20,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20,ylim=c(0,6),type="l",lwd=3)

screen(listScreen[3])
plot(-5:5/10,2.5-(-5:5)^2/20,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20,ylim=c(0,6),type="l",lwd=3)

screen(listScreen[5])
plot(-5:5/10,(-5:5)^2/10,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20+1.25,ylim=c(0,6),type="l",lwd=3)
close.screen(all.screens=TRUE)

### Sorry for that...

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.