stCheckObs: Check an 'obs' data.frame.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Checks that a observation data.frame is valid.

Usage

1

Arguments

obs

data.frame to be checked.

Details

A valid observation data.frame needs to fullfill:

Value

Nothing

Author(s)

Johan Lindstrom

See Also

Other object checking utilities: stCheckClass, stCheckCovars, stCheckFields, stCheckSTcovars

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ##load data
  data(mesa.model)

  ##check observations 
  stCheckObs( mesa.model$obs )
  ##some possible failures
  mesa.model$obs <- rbind(mesa.model$obs, mesa.model$obs[1,])
  try( stCheckObs( mesa.model$obs ) )
  mesa.model$obs$obs[1] <- NaN
  try( stCheckObs( mesa.model$obs ) )
  mesa.model$obs$date <- as.character( mesa.model$obs$date )
  try( stCheckObs( mesa.model$obs ) )
  mesa.model$obs$date <- NULL
  try( stCheckObs( mesa.model$obs ) )

SpatioTemporal documentation built on May 2, 2019, 8:49 a.m.