R/write_hbv_waterland.R

Defines functions write_hbv_waterland

#' write_hbv_waterland
#' this function writes a list object area into a file file_waterland
#' @param area
#' @param file_waterland
#' @export

write_hbv_waterland <- function(area = area, file_waterland = file) {
  file.create(file_waterland)
	for (iCat in length(area)) {
	  write.table(sprintf("# %s # %d", area[[iCat]]$id, length(area[[iCat]]$landindex)), file_waterland, quote = FALSE, col.names = FALSE, row.names = FALSE, append = TRUE)
	  write.table(cbind(area[[iCat]]$landindex, area[[iCat]]$geoindex), file_waterland, quote = FALSE, col.names = FALSE, row.names = FALSE, append = TRUE)
	}
}
NVE/hongR documentation built on Nov. 30, 2021, 5:54 a.m.