I reloaded some code I wrote a while again. I am trying to plot an individual raster from a raster stack, however keep encountering a problem with creating the first plot using plot.new. This is the error I am getting.
newras6< stack("/Users/jadedalpoimguedes/Desktop/data/kamiak/nick.maggio/JadeDAlpoim/PARALLEL/OUTPUT/MARCOTT/Barley_Alaska_120_125_Z_ETOPO5.tif")
newras6
# class       : RasterStack 
# dimensions  : 600, 59, 35400, 276  (nrow, ncol, ncell, nlayers)
# resolution  : 0.08333333, 0.08333333  (x, y)
# extent      : 120.0417, 124.9583, 10.04167, 60.04167  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
# names       : Barley_Al//Z_ETOPO5.1, Barley_Al//Z_ETOPO5.2, Barley_Al//Z_ETOPO5.3, Barley_Al//Z_ETOPO5.4, Barley_Al//Z_ETOPO5.5, Barley_Al//Z_ETOPO5.6, Barley_Al//Z_ETOPO5.7, Barley_Al//Z_ETOPO5.8, Barley_Al//Z_ETOPO5.9, Barley_Al//_ETOPO5.10, Barley_Al//_ETOPO5.11, Barley_Al//_ETOPO5.12, Barley_Al//_ETOPO5.13, Barley_Al//_ETOPO5.14, Barley_Al//_ETOPO5.15, ... 
# min values  :                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0,                     0, ... 
# max values  :                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535,                 65535, ... 
plot.new(newras6[[5]])
Error in plot.new(newras6[[5]]) : unused argument (newras6[[5]])
I have tried creating an object and plotting this, however am still getting the same error.
new<-newras5[[5]]
Error in plot.new(new) : unused argument (new)
This has not happened to me before.
Any suggestions on what may be wrong?
 
    