Description Methods (by generic) Slots Objects from the Class Note See Also Examples
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.
getCity
: returns the city of the original search location
getState
: returns the state of the original search location
getCountry
: returns the country of the original search location
getLat
: returns the latitude of the original search location
getLon
: returns the longitude of the original search location
getData
: returns the data of the original search location
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 can be created by calls of the form new("PWS", ...) or by calling the function getPWS
.
The class PWS-class
has a validity (see validObject
) check function.
1 2 3 | a = getPWS(zipcode = 94305)
b = getPWS(city = "San Francisco", state = "CA")
validObject(a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.