cfStation-class: The Clifro Station Object

Description Usage Arguments Details Value See Also Examples

Description

Create a cfStation object containing station information for one or more CliFlo stations.

Usage

1

Arguments

...

comma separated agent numbers

Details

A cfStation object is created by the constructor function cf_station. The unique agent numbers of the stations are all that is required to create a cfStation object using the cf_station function. The rest of the station information including the name, network and agent ID, start and end dates, coordinates, as well as other data is scraped from CliFlo.

This function is used for when the agent numbers are already known. For help creating cfStation objects when the agent numbers are unknown see the cf_find_station function.

Value

cfStation object

See Also

cf_find_station for creating cfStation objects when the agent numbers are not known and vignette("cfStation") for working with clifro stations including spatial plotting in R. For saving cfStation objects as KML files refer to the vignette or cf_save_kml.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Create a cfStation object for the Leigh 1 and 2 Ews stations
leigh.st = cf_station(1339, 1340)
leigh.st

# Note, this can also be achieved using the '+' operator
leigh.st = cf_station(1339) + cf_station(1340)
leigh.st

# Add another column showing how long the stations have been open for
leigh.df = as(leigh.st, "data.frame")
leigh.df$ndays = with(leigh.df, round(end - start))
leigh.df

# Save the stations to the current working directory as a KML to visualise
# the station locations
cf_save_kml(leigh.st)

## End(Not run)

clifro documentation built on May 24, 2021, 9:06 a.m.