title: How to plot multiple variables of a data.table in R?
body: <p>I have a time series that has a DateTime variable and 4 more variables, which are measured over time.
  I'm trying to create a function in R which gets the data set (as a data.table) and creates 4 plots, each plot showing one of the four variables (y axis) against time (x axis).
  I already found out that I can create multiple plots by using</p>
  
  <pre><code>par(mfrow=c(4,1))
  </code></pre>
  
  <p>But the problem is that I don't know how to reference each of the 4 columns in the "plot" function.</p>
  
  <p>If I do a single plot without a function, it looks like this:</p>
  
  <pre><code>plot(DT[,DateTime],DT[,VAR1],type="l",ylab="VAR1")
  </code></pre>
  
  <p>This is exactly the line which I want for VAR1...VAR4 using a function. Note that I do not want a plot which depicts all 4 variables in a single plot, but rather 4 plots, one for each variable.</p>
  
  <p>Thanks!</p>