[RS-ecology] FW: Chapter 11

Vladimir Ruslan Wingate vladimir.wingate at unibas.ch
Thu Apr 6 14:05:28 CEST 2017


Hi all, 
>
> Thank you very much for you reply.
>
> I attached a some code for the first section of chapter 11.
>
> Basically I have two problems, the first is really the working 
> directory, and the second has to do with assigning dates (please see
> below)
>
> Best regards,
>
> Vladimir
>
> 1)
>
> if (!file.exists(fileout)) {
>
>   if (!file.exists(pth)) {
>
>     print("the outfolder does not exist and will be created")
>
>     print(pth)
>
>     dir.create(pth)
>
>   }
>
> }
>
> [1] "the outfolder does not exist and will be created"
>
> [1] "C:/MODIS/raster_data/MOD13Q1"
>
> Warning message:
>
> In dir.create(pth) :
>
>   cannot create dir 'C:\MODIS\raster_data\MOD13Q1', reason 'No such 
> file or directory'
>
> 2)
>
> names(s) <- as.Date(modis.hdf[[1]], "A%Y%j")
>
> Error in `names<-`(`*tmp*`, value = c(NA_real_, NA_real_)) :
>
>   incorrect number of layer names
>


More information about the RS-ecology mailing list