Instantly share code, notes, and snippets.

# Leonidas Liakoskokkytos

• Sort options
Created Nov 27, 2019
View stackApply.R.patch
 --- stackApply.R 2019-11-27 09:12:08.000000000 +0200 +++ /home/leonidas/Desktop/raster_source/source/R/stackApply.R 2019-11-27 12:50:43.268272464 +0200 @@ -84,9 +84,9 @@ } if (rowcalc) { - v <- lapply(uin, function(i) fun(a[, ind==uin[i], drop=FALSE], na.rm=na.rm)) + v <- lapply(uin, function(i) fun(a[, ind==i, drop=FALSE], na.rm=na.rm)) } else { - v <- lapply(uin, function(i, ...) apply(a[, ind==uin[i], drop=FALSE], 1, fun, na.rm=na.rm))
Created Nov 26, 2019
View calc_mean.R
 # Calculate mean per day of week. library(lubridate) library(raster) library(magrittr) r <- raster( nrows = 300,
Created Nov 23, 2019
The purpose is to compare whether the indexes of names from the result of the stackApply function correspond to the indexes that were defined as parameter input. An alternative method (ver_median function) is used for comparison.
View calc_median_wrong_results.R
 # Calculate median per day of week. library(lubridate) library(raster) library(magrittr) r <- raster(nrows = 300, ncols = 300, res = 500, xmn = 0, xmx = 150000, ymn = 0,
Created Nov 22, 2019
Calculate median per day of week
View calc_median.R
 # Calculate median per day of week library(lubridate) library(raster) library(magrittr) r <- raster(nrows = 10, ncols = 10, res = 1, xmn = 0, xmx = 10, ymn = 0,
Created Oct 20, 2019
View keybase.md

### Keybase proof

I hereby claim:

To claim this, I am signing this object:

Last active Dec 1, 2019
[Λήψη δορυφορικών εικόνων στην R μέσω του GIBS API] #GIBS
View rgibs.R
 library(gdalUtils) rGIBS<-function(date=Sys.Date(), EPSGCODE,PRODUCT,projwin, outputdir=file.path(Sys.getenv("HOME"),"gibs_downloads"),...){ dir.create(outputdir, showWarnings = FALSE) setwd(outputdir) #generate xml makeXML <- function(date, EPSGCODE,PRODUCT){ myxml<- sprintf('https://gibs.earthdata.nasa.gov/twms/epsg%s/best/twms.cgi?%s tileset%s',EPSGCODE, PRODUCT, date) tmp <- tempfile(fileext=".xml") fileConn<-file(tmp)
You can’t perform that action at this time.