subsetcircle {ssBase}R Documentation

Circular Subset of Events

Description

Selects events within a specified circular selection criteria from given catalogue. Note that subset.circle is deprecated; it conflicts with the generic function subset. Change to subsetcircle; it has the same arguments.

Usage

subsetcircle(x, centrelat=0, centrelong=0, minradius=0, maxradius=Inf,
             mindepth=0, maxdepth=Inf, minmag=-Inf, maxmag=Inf,
             minday=-Inf, maxday=Inf, radius=6371,
             report.count=TRUE, na.rm=TRUE, ...)

#   Deprecated Usage:
subset.circle(x, centrelat=0, centrelong=0, minradius=0, maxradius=Inf,
              mindepth=0, maxdepth=Inf, minmag=-Inf, maxmag=Inf,
              minday=-Inf, maxday=Inf, radius=6371,
              report.count=TRUE, na.rm=TRUE, ...)

Arguments

x catalogue name.
centrelat latitude of the circle centre. Specified as degrees north (positive) or south (negative) of the equator (-90 to 90).
centrelong longitude of the circle centre. Specified as degrees east of Greenwich (0 to 360).
minradius surface arclength radius (km) within which events are not to be selected.
maxradius surface arclength radius (km) within which events to be selected.
mindepth minimum depth in kilometres.
maxdepth maximum depth in kilometres.
minmag minimum magnitude.
maxmag maximum magnitude.
minday the number of days (and fractions) after 00:00 hrs on 1 January 1970 from which events are required. See Details.
maxday the number of days (and fractions) after 1 January 1970 denoting the upper bound of the time interval containing the required events. See Details.
radius the assumed radius of the earth. Default is 6371 km.
report.count Boolean. Report the number of events referred to by the new subset. Default is TRUE.
na.rm Boolean. Determines whether those events with missing values of the subsetting variables should be excluded, see Details. Default is TRUE.
... other options for restricting Catalogue data. These must take the form option == value, where option is a component of the specified catalogue.

Details

The subsetting is based on the catalogue variables latitude, longitude, depth, magnitude and time. The default settings for each of these variables is to take all events. The function only works through each of the “min” and “max” values included in your function call. Those arguments not explicitly listed will have no effect. A logical vector is constructed with the same length as the number of events in the catalogue, and indicates whether a given event satisfies the subsetting criteria. From this, the vector of indices of the required events is created.

Historical events often have missing values, particularly the magnitude and depth. Consider the situation where minmag=6. The logical vector within the function will contain TRUE's and FALSE's for those events that satisfy or not satisfy this condition, respectively. However, for those historical events with a missing magnitude (NA), the elements in the logical vector will also be NA. The argument na.rm determines whether these events should be removed (TRUE) or included (FALSE) in the subset. The default setting is to remove such events, though in the context of large historical events, it would be more sensible to include them, i.e. na.rm=FALSE.

The arguments minday and maxday represent the boundary points of the time interval, and can represent fractions of days. For example, 00:00 hrs on 1 Jan 1970 is represented as minday=0, whereas 18:00 hrs on 2 Jan 1970 is represented as minday=1.75. Similarly, 18:32:24 hrs on 30 Sept 1990 could be specified as minday = julian(9,30,1990) + 18/24 + 32/(24*60) + 24/(24*60*60). Note that maxday = julian(1,1,1990) represents the point 00:00 hrs on 1 Jan 1990, and therefore will not include events on 1 Jan 1990 after midnight.

Value

Returns an object of type list with class "subset". All optional arguments above, except radius, are included as elements within the list. Other components within the list are:

indices an array of indices for events in catalogue x satisfying the selection criteria.
catname catalogue name.
type type of subset, set to "Circular".

See Also

subsetpolygon, subsetrect, subsetsphere, print.subset, summary.subset

Examples

#   Select events from the NZ55 catalogue, no more than
#   100kms from Wellington.

data(NZ55)
a <- subsetcircle(NZ55, centrelat=-41.3, centrelong=174.8, 
                   maxradius=100)
print(summary(a))

[Package ssBase version 2.2-1 Index]