Do you want an interactive map, or are you fine with plotting the NDVI timeseries for one (or few) specific points? In the latter you raster::extract()
the NDVI-Stack values under your points, and use the returned dataframe as input for your plot.
Edit:
I was thinking... You actually can do some interactive point-selection using raster::click()
. So as a little example I just wrote this for you:
library(raster)
# Sample Dataset
year2000 <- raster(nrows=10, ncols=10, vals=runif(100, -1,1))
year2005 <- raster(nrows=10, ncols=10, vals=runif(100, -1,1))
year2010 <- raster(nrows=10, ncols=10, vals=runif(100, -1,1))
year2015 <- raster(nrows=10, ncols=10, vals=runif(100, -1,1))
NDVI.stack <- stack(year2000, year2005, year2010, year2015) # Representing your layerstack
# Plot Stack, select point and automaticly extract values
plot(NDVI.stack[[1]]) # One exemplary layer for orientation
values <- click(NDVI.stack, n=1)
# Compose and plot dataframe
timeseries <- data.frame(year = c(2000, 2005, 2010, 2015),
values = values[1, ])
plot(timeseries, type="l")