Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/UpdateSubsets.R
A function that identifies, from a given dataset, which subsets have already been downloaded and returns a dataframe of those yet to be downloaded. A useful function if the list of locations for subsets is continually increasing or if download was halted previously.
1 | UpdateSubsets(LoadDat, StartDate=FALSE, Dir=".")
|
LoadDat |
Input dataset: either the name of an object already in the workspace, or a file to be read in by specifying its file path as a character string, that has location data, end date (end.date) and study ID for each location. |
StartDate |
Logical: Specifying whether StartDate was specified in the original MODISSubset download. |
Dir |
String: Directory where previously downloaded subsets are saved. Default is current working directory. |
The input dataset should be organised accordingly: "lat" and "long" columns showing WGS-1984 decimal degrees latitudes and longitudes respectively; "end.date" for study end date.
A dataframe containing any data for which a subset has not been downloaded. This can then be used with MODISSubsets.
Helen Phillips and Sean Tuck
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# dontrun() used because running the example requires internet access.
data(SubsetExample, ConvertExample)
modis.subset <- ConvertToDD(XY = ConvertExample, LatColName = "lat", LongColName = "long")
modis.subset <- data.frame(lat = c(SubsetExample$lat, modis.subset[ ,1]),
long = c(SubsetExample$long, modis.subset[ ,2]),
start.date = rep(SubsetExample$start.date, 9),
end.date = rep(SubsetExample$end.date, 9))
MODISSubsets(LoadDat = SubsetExample, Product = "MOD13Q1", Bands = c("250m_16_days_EVI",
"250m_16_days_pixel_reliability"), Size = c(0,0), StartDate = TRUE)
Updated.modis.subset <- UpdateSubsets(LoadDat = modis.subset, StartDate = TRUE)
MODISSubsets(LoadDat = Updated.modis.subset, Product = "MOD13Q1", Bands = c("250m_16_days_EVI",
"250m_16_days_pixel_reliability"), Size = c(0,0), StartDate = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.