title: Creating a time series from a netcdf file for specific coordinates
body: <p>I am currently trying to create a time series of precipitation data from the CRU global land precipitation data. 
  The file I am working has 60 time slices, from 2011-2015. </p>
  
  <p>My code so far is:</p>
  
  <pre><code>b&lt;-brick('/Volumes/LDRIVE2/Masters/Dissertation/Global Surface Water Explorer/UEA_rainfall/cru_ts4.00.2011.2015.pre.dat.nc/cru_ts4.00.2011.2015.pre.dat.nc')
  
  lon&lt;-c(26.25,27.75)
  lat&lt;-c(-16.25,-15.25)
  points&lt;-SpatialPoints(cbind(lat,lon))
  
  points_data &lt;- b
  
  raster::extract(points, df = T) %&gt;% 
    gather(date, value, -ID) %&gt;% 
    spread(ID, value) %&gt;%    
    mutate(date = ymd(str_sub(names(b),2))) %&gt;% 
    as_tibble()
  
  plot(points_data$date,points_data$`1`)
  </code></pre>
  
  <p>The following error appears when I try to run this:</p>
  
  <p>'Error in plot.window(...) : need finite 'ylim' values
  In addition: Warning messages:
  1: In min(x) : no non-missing arguments to min; returning Inf
  2: In max(x) : no non-missing arguments to max; returning -Inf'</p>
  
  <p>As you can see from above I am trying to create a timeseries for a range of coordinates, if it is simpler to find an average of these points and then plot a timeseries I would but also having difficulties with this. This is my first time trying to netCDF files so I not overly confident with it, any suggestions of how to do this would be greatly appreciated! </p>