write.stat: Functions to write stats and evaluation

View source: R/io.stats.R

write.statR Documentation

Functions to write stats and evaluation

Description

Functions to write stats and evaluation output. If a file name ending with .csv is provided to the function will save using write.csv otherwise the function write.table.

Usage

write.stat(stat, file, sep = ";", dec = ".", verbose = FALSE, ...)

Arguments

stat

observed data.frame

file

model data.frame

sep

the field separator string, passed to write.table function

dec

he string to use for decimal points, passed to write.table function

verbose

display additional information

...

arguments passed to write.table and write.csv functions

Examples


sample <- read.stat(paste0(system.file("extdata", package = "hackWRF"),"/sample.csv"),
                    verbose = TRUE)
dir.create(file.path(tempdir(), "stats"))

write.stat(file    = paste0(file.path(tempdir(), "stats"),'/sample.txt'),
           stat    = sample,
           verbose = TRUE)

write.stat(file    = paste0(file.path(tempdir(), "stats"),'/sample.csv'),
           stat    = sample,
           verbose = TRUE)


Schuch666/hackWRF documentation built on June 9, 2025, 1:46 p.m.