I have an xyf object from the kohonen package, and wish to plot a
lattice or grid or multiplot of a set of attributes of this object.
I've included the structure of the object below for reference, and
here is the set of plots I wish to produce, given in long-hand. I
don't know enough R to generalise this set of commands, can you help?
I am looking for a single command if possible.
op <- par(mfrow=c(2, 3)) # 6 plots in this case
plot(somdata.xyf,
type="property",
property=somdata.xyf$codes$X[, 1],
main=colnames(somdata.xyf$codes$X)[1])
plot(somdata.xyf,
type="property",
property=somdata.xyf$codes$X[, 2],
main=colnames(somdata.xyf$codes$X)[2])
... etc...
plot(somdata.xyf,
type="property",
property=somdata.xyf$codes$X[, 6],
main=colnames(somdata.xyf$codes$X)[6])
par(op)
The "codes" list of the somdata.xyf object contains a further list "X"
containing the items I wish to plot. So the properties are
somdata.xyf$codes$X[, 1:6].
Here are some of the details (snipped for clarity):
str(somdata.xyf)
List of 12
$ data : num [1:68, 1:6] -0.7509 -0.057 -1.5547 -0.4019 -0.0192 ...
... <snip>
$ codes :List of 2
..$ X: num [1:25, 1:6] -2.006 -0.817 -0.249 0.131 0.476 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : NULL
.. .. ..$ : chr [1:6] "MEAS_TC" "SP" "LN" "SN" ...
..$ Y: num [1:25, 1] -2.006 -0.817 -0.249 0.131 0.476 ...
$ changes : num [1:500, 1:2] 0.1058 0.0954 0.1197 0.1085 0.1279 ...
... snip