R/result.extract.mask.R

Defines functions result.extract.mask

Documented in result.extract.mask

result.extract.mask <- function(mask.grid, values){
	# mask values: values in the area of germany should have valid value OR value -9999
	germany.mask <- which(is.na(mask.grid$alt)==FALSE)
		
	# values of doy.pim
	values.id.to.substitute <- germany.mask[which(is.na(values[germany.mask])==TRUE)]
	values[values.id.to.substitute] <- rep(-9999, length(values[values.id.to.substitute]))

	return(values)
}

Try the phenmod package in your browser

Any scripts or data that you put into this service are public.

phenmod documentation built on May 29, 2017, 11:37 a.m.