lister: Creates a list of blended/non-bladed files for some climate...

Description Usage Arguments Value Examples

View source: R/lister.R

Description

This function creates a list of blended or non-bladed files containing data of a specified element to be QCed.

Usage

1
lister(element)

Arguments

element

climatological element (defined by means of two letters, i.e. 'TX')

Value

list of blended or non-bladed files to be QCed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#Set a temporal working directory:
wd <- tempdir(); wd0 <- setwd(wd)
#Create subdirectory where a station file has to be located
dir.create(file.path(wd, 'raw'))
#NON-BLENDED ECA&D SERIES
#Extract the non-blended ECA&D data and station files from the example data folder
#Only TX (maximum air temperature) and CC (cloud cover) data are used in the example
path2txdata<-system.file("extdata", "TX_SOUID132734.txt", package = "INQC")
txdata<-readr::read_lines_raw(path2txdata)
readr::write_lines(txdata, file=paste(wd,'/raw/TX_SOUID132734.txt',sep=''))
path2ccdata<-system.file("extdata", "CC_SOUID132727.txt", package = "INQC")
ccdata<-readr::read_lines_raw(path2ccdata)
readr::write_lines(ccdata, file=paste(wd,'/raw/CC_SOUID132727.txt',sep=''))
options("homefolder"='./'); options("blend"=FALSE)
list.nb<-lister('TX')
#BLENDED ECA&D SERIES
#Extract the blended ECA&D data and station files from the example data folder
#Only TX (maximum air temperature) and CC (cloud cover) data are used in the example
path2txdata<-system.file("extdata", "TX_STAID000002.txt", package = "INQC")
txdata<-readr::read_lines_raw(path2txdata)
readr::write_lines(txdata, file=paste(wd,'/raw/TX_STAID000002.txt',sep=''))
path2ccdata<-system.file("extdata", "CC_STAID000001.txt", package = "INQC")
ccdata<-readr::read_lines_raw(path2ccdata)
readr::write_lines(ccdata, file=paste(wd,'/raw/CC_STAID000001.txt',sep=''))
options("blend"=TRUE)
list.b<-lister('TX')
#Return to user's working directory:
setwd(wd0)

INQC documentation built on May 24, 2021, 5:07 p.m.