PWS-class: An S4 class "PWS"

Description Methods (by generic) Slots Objects from the Class Note See Also Examples

Description

The class of object returned by the getPWS function. The PWS class represents the original search location and its nearby PWS (personal weather stations), which are retrieved from the website http://www.wunderground.com.

Methods (by generic)

Slots

city

a single character string that shows the city of the original search location

state

a single character string that shows the state of the original search location; is character(0) if the origin is outside the U.S.A

country

a single character string that shows the country of the original search location; is character(0) if the the origin is within the U.S.A

lat

a numeric that shows the latitude of the original search location; must be between -180 and 180

lon

a numeric that shows the longitude of the original search location; must be between -180 and 180

data

a data frame that contains the information of the nearby PWS; in particular, the columns of the data frame should be:

neighborhood

a single character string that shows the neighborhood of the PWS

city

a single character string that shows the city of the PWS

state

a single character string that shows the state of the PWS

country

a single character string that shows the country of the PWS

id

a numeric that shows the id of the PWS

lat

a numeric that shows the latitude of the PWS

lon

a numeric that shows the longitude of the PWS

distance_km

a positive integer that shows the distance from the PWS to the original search location in kilometers

distance_mi

a positive integer that shows the distance from the PWS to the original search location in miles

Objects from the Class

Objects can be created by calls of the form new("PWS", ...) or by calling the function getPWS.

Note

The class PWS-class has a validity (see validObject) check function.

See Also

getPWS

Examples

1
2
3
a = getPWS(zipcode = 94305)
b = getPWS(city = "San Francisco", state = "CA")
validObject(a)

mengyigao/PWS documentation built on May 22, 2017, 3:30 a.m.