First, you are using R. R Studio is just an IDE for R so in the future please make this an R question. I will warn you that working with HDF files in R is a pain. In theory GDAL supports HDF5 so one could use readGDAL in the rgdal package. Depending on the source of the data readGDAL has a high fail rate making it less than reliable.  

Historically, there is a "hdf5" package available but it has some odd dependencies, is a bit clunky and not available for the current version of R. You would have to back version R and then download a supported version of the package.   

I would recommend using "rhdf5" which is available on Bioconductor. There is some slight overhead in installing it but is quite easy with a few lines of code. The bioLite script allows for access to Bioconductor and management of packages.  

If in windows, run R as administrator. This installs bioLite and rhdf5

source("http://bioconductor.org/biocLite.R")
biocLite("rhdf5")    


Once you have the data read into R you can coerce into your preferred spatial class and perform whatever operation you wish. I do have to say that R does not seem like the ideal software for this task. For a mosaic operation on a number of HDF files I would use a utility to convert the data into a different image format and the use a GIS software (e.g., GRASS, QGIS...) to mosaic the images. GRASS does support HDF and seems like a sensible alternative. You may be able to do this in QGIS using the GRASS utilities.       

Here is an example of working with HDF files in R.
http://www.r-bloggers.com/working-with-hdf-files-in-r-example-pathfinder-sst-data/

Is there anyway to stack or merge .hdf files in R Studio?
Can we completely reverse-engineer the source code from java bytecode ? Why this feature is allowed in Java and How successful are java decompilers against obfuscators.?
