0

I got along via summary(object) works but plot(object) not to plot a subset of a data frame (lots of devices and each with Amplification against Voltage). Now I almost have the wanted result but why is the subset provided with two plots respectively divided into a false and true plot? Is the one plot the one I restricted (true) and the other plot all other subsets (false)?

I plotted it via lattice: xyplot(Amplification ~ Voltage | Serial_number==912009913, data=before, grid=TRUE)

(A "true / false plot lattice r" searching or something similar didn't provide me with a(ny) result)

True/false plots

Ben
  • 1,432
  • 4
  • 20
  • 43
  • 1
    the `|` in lattice `xyplot` is *conditional on*, so the FALSE is for devices that are not your serial number, and TRUE is the device you want. If you only want your device, I think the syntax you need is `xyplot(Amplification ~ Voltage, data=before[ before$Serial_number==912009913,], grid=TRUE)` – xraynaud Jul 04 '17 at 15:31
  • @xraynaud Thanks, will try this out in the office! Btw: How do I accept a comment as a solution? – Ben Jul 04 '17 at 21:42

1 Answers1

0

The | in lattice xyplot means conditional on, so FALSE corresponds to devices that do not have the serial number 912009913, and TRUE corresponds to the device with serial number 912009913. If you only want a plot for your device, I think the syntax you need is

xyplot(Amplification~Voltage, data=before[before$Serial_number==912009913,], 
    grid=TRUE)
xraynaud
  • 2,028
  • 19
  • 29