Learn R Programming

spreval (version 1.1.0)

overlap: Superimpose catch can data

Description

Simulate overlap from adjacent laterals using data from one lateral.

Usage

overlap(sl,sc,lcdata,rcdata)

Arguments

sl

lateral spacing.

sc

catch can spacing perpendicular to lateral.

lcdata

data from cans left of lateral; order is proximal to distal of lateral.

rcdata

data from cans right of lateral; order as in lcdata.

Value

A named list with the following items:

sum.left

numeric array of summed overlap catch can data between tested lateral and simulated lateral to the left.

sum.right

numeric array of summed overlap catch can data between tested lateral and simulated lateral to the right.

Details

Superimposes and sums one row of catch can data as if adjacent lateral had same catch pattern. Repeat function for multiple rows of catch cans between laterals, to normally include all rows of cans between two sprinklers.

Examples

Run this code
# NOT RUN {
sl<-60 #lateral spacing. Units are feet
sc<-10 #catch cans spacing along single "row". Units are feet
#note that neither lcdata or rcdata have 6 cans. function will generate "0" cans.
lcdata<-c(0.28,0.24,0.21,0.10)
rcdata<-c(0.23,0.21,0.3)
#generate summed catch for one row at 60 foot lateral spacing
spacing.60<-overlap(sl,sc,lcdata,rcdata)
spacing.60
#now generate summed catch assuming a 50 foot lateral spacing
sl<-50
spacing.50<-overlap(sl,sc,lcdata,rcdata)
spacing.50
  
# }

Run the code above in your browser using DataLab