[R] Assign value to plot variable name (make.group functions)
Mark Fingerle
mark.fingerle at brainlab.com
Mon Jun 13 10:47:43 CEST 2016
Dear all,
In order to create plots comparing two measurements I am using the "xyplot" and "make.groups" functions (see script example below).
Now I would like to assign a value to the variable names in the plot. Meaning: In the beginning of my script I assign a name(value) to a variable (for example: ID1 <- Name1). Now I would like to use this variable to name the plot variables.
Maybe easier to understand using an example:
Script:
pdf("REP_Chess.pdf")
scChess1=xyplot( x = ObjErrorX~Image, data=make.groups("ID1"=Chess1, "ID2"=Chess2),
pch=16 ,main="Chess - Object Error X [mm]", auto.key=T, groups=which, scales=list(relation="free",
y=list(rot=0), x=list(rot=45), abbreviate = TRUE),
print(scChess1, split=c(1,1,1,1), more=False)
dev.off()
I would like to assign a value to ID1, so that this value is shown on the plot labels after it is printed.
Something like : ID1 <- Name1 , and Name1 is shown in the plots.
Thank you very much in advance.
Cheers
Mark Fingerle
[[alternative HTML version deleted]]
More information about the R-help
mailing list