Firstly, I'll provide a bit of context behind my question. I've been reading a paper about bushfire modelling, and the paper uses the MODIS datasets (this is my first time learning about them). In particular, the paper uses fire detection data from the MCD14ML dataset, and NDVI values from the MYD13A3 (collection 6) dataset. I'm very new to MODIS datasets and HDF files. I've downloaded the 2003 MCD14ML dataset from https://earthdata.nasa.gov/earth-observation-data/near-real-time/firms/mcd14ml. Briefly, this dataset contains some attributes (including latitude, longitude, time) of detected "hotspots" in Australia, within the year of 2003. The dataset is in CSV form (so different attributes are in different columns). Below is an image of what I am seeing (in excel). So far, so good.
Unfortunately, the MYD13A3 (collection 6) dataset is not available in csv form (and the same applies for most other MODIS datasets). My goal is to add a column to the MCD14ML csv file which shows the relevant NDVI value for the region that was identified as a hotspot. So basically, something like this (I've made up the NDVI values).
I'm fairly confident that there's a way to download the MYD13A3 MODIS file in R, and that there's a way to extract NDVI values from it. Regarding downloading MODIS files in R, I tried to read the documentation for the R packages 'MODISTools' and 'MODIS'. Unfortunately, the documentations weren't very clear on how to use them to download MODIS files - so I searched on stack exchange, and found an answer that works at MODIS R Connection error . Based on the answer there, I've done the following.
hdf = getHdf("MYD13A3", collection = "006"
+ , extent="Australia"
+ , begin = "2003.01.01", end = "2003.01.03")
So what the above does is it downloads a bunch of HDF files to some specified folder on my computer. My understanding is that these HDF files contain the NDVI values of some geographic region. At this stage, what I want to do is to somehow extract the NDVI values from each HDF file, and put them into an R dataframe/CSV file. How can I do this? An additional question is whether there is a way (in R) to extract the NDVI values given longitude and latitude data.