Description Usage Arguments Details Value Note Author(s) Examples
View source: R/functions.r View source: R/percentQC.r
Gives the percentage of a each QC flag for a variable and writes the result either on the standard output or a text file.
1 2 |
data |
A data frame |
var |
A string giving the name of the variable. |
qc_var |
A string giving the name of the QC variable |
write |
Logical. If true the output is written on a text file rather the standard output. The name of the output file is standard and is percent_qc_flags.txt. |
dir |
The directory to write the output file. If none given then the working directory will be used. |
By default the function will give the percentage of each QC flag for CO2 flux. Other variables which have QC can be defined using the var option e.g., sensible heat, latent heat and momentum flux. The variable should have a QC flag for the function to work. If there is no QC flag associated with the variable, the result will be zero.
Text with output percentages
Variable needs to have an associate QC flag. Function currently works for the three flag system i.e., 0, 1, 2.
Georgios Xenakis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##Load the data
data(fluxes)
## Find the percent of each QC flag for CO2 before cleaning
percentQC(fluxes)
## Do the same for sensible heat
percentQC(fluxes,var="H")
## Clean data
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,timesList=3,distCor=TRUE,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))
## Find the percent of each QC flag for CO2 after cleaning
percentQC(fluxes)
## Do the same for latent heat
percentQC(fluxes,var="H")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.