title: Adding time dimension in .nc file generated from ascii file
body: <p>I have tavg10km_reference_reference_1981_001.txt file with daily temperature data in ascii format. I am trying to convert it into .nc file. I used writeRaster command (script written below). </p>
  
  <pre><code>rm(list=ls())
  library (raster)
  library (ncdf4)
  setwd("X:\\try\\")
  txt&lt;-raster("X:\\try\\tavg10km_reference_reference_1981_001.txt")
  x &lt;- writeRaster(txt, "tavg10km_reference_reference_1981_001.nc")
  </code></pre>
  
  <p>The new file is:</p>
  
  <pre><code>1 variables (excluding dimension variables):
  float tavg10km_reference_reference_1981_001[easting,northing]   
  _FillValue: -3.39999995214436e+38
  missing_value: -3.39999995214436e+38
  long_name: tavg10km_reference_reference_1981_001
  min: -21.4279098510742
  max: 18.6759605407715
  
   2 dimensions:
      easting  Size:72
          units: meter
          long_name: easting
      northing  Size:79
          units: meter
          long_name: northing
  5 global attributes:
      crs: +proj=utm +zone=45 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
      crs_format: PROJ.4
      Conventions: CF-1.4
      created_by: R, packages ncdf4 and raster (version 2.6-7)
  </code></pre>
  
  <p>However, it does not have time dimension and I want to add time dimension. This is daily data of 1981-01-01. Any suggestion! 
  Thank you in advance!</p>