title: Unable to print a jpeg plot in r
body: <p>My example dataframe looks like this:</p>
  <pre><code>dput(t2_example)
  structure(list(rDate = structure(c(1651086000, 1651087800, 1651089600, 
  1651091400, 1651093200, 1651095000, 1651096800, 1651098600, 1651100400, 
  1651102200, 1651104000, 1651105800, 1651107600, 1651109400, 1651111200, 
  1651113000, 1651114800, 1651116600, 1651118400, 1651120200, 1651122000, 
  1651123800, 1651125600, 1651127400, 1651129200), class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;), tzone = &quot;UTC&quot;), BattV_Min = c(13.97, 13.58, 13.4, 
  13.25, 13.13, 13.04, 12.99, 12.97, 12.96, 12.94, 12.94, 12.93, 
  12.93, 12.92, 12.91, 12.9, 12.89, 12.89, 12.87, 12.86, 12.85, 
  12.82, 12.82, 12.83, 13.02)), row.names = c(NA, -25L), class = &quot;data.frame&quot;)
  </code></pre>
  <p>Basically, I have 2 columns, 1st with the dates in <code>POSIXct</code> format and the 2nd with several numbers representing the battery voltage.
  I want to create a <strong>jpeg</strong> plot (voltage difference through time) with specific dimensions and characteristics and save it directly in a folder.</p>
  <p>I trying this:</p>
  <pre><code>Sys.setenv(tz='GMT')
  
  mypath= &quot;C:/Users/local/Desktop/t2_plots/bat.jpg&quot;
  jpeg(file = mypath, width = 800)
  bat&lt;-plot(t2_example$rDate, t2_example$BattV_Min, ylim=c(10,15),pch=&quot;.&quot;)
  abline(h=11, col=&quot;red&quot;)
  print(bat)*
  </code></pre>
  <p>On * the print in <strong>NULL</strong></p>
  <p>There is a jpeg image that goes to the mentioned folder but the image is empty. I've been searching for what possible I'm doing wrong but I don't know.</p>
  <p>Any help will be much appreciated.</p>