Description Usage Arguments Value Author(s) Examples
Solves for b according to:
fz = fz0*(z/z0)^(-b)
Intakes two vectors: depths and flux and optional reference depths and target depths. The function will return 5 variables, in order: min, max, mean, median, allvals
If you data is in excel, be sure to download the file into a dataframe, then open that dataframe to figure out the names of the columns you are interested in or rename columns. This will be easiest with a worksheet that only contains columns of data. Ex:
library(gdata)
mydata = read.xls("mydata.xls") #Reads from the first sheet only
1 | martincurveb(des, flu, rds, tds)
|
des |
Vector that contains all depth data. Needs to be the same length as "fluxes". |
flu |
Vector that contains all flux data. Needs to be the same length as "depth". |
rds |
Optional specific reference depth data. Can be a single value or vector. If you include rds, you need to also include tds. |
tds |
Optional specific target depth data. Can be a single value or vector. If you include tds, you need to also include rds. |
Returns a list of five values: "Minimum" b value, "Maximum", "Mean", "Median", and "AllVals" (which is all calculated b values).
Minimum |
Single numeric minimum b value |
Maximum |
Single numeric maximum b value |
Mean/Average |
Single numeric mean b value |
Median |
Single numeric median b value |
AllVals |
List of all numeric calculated b values |
Kate Evans, University of Montana/Flathead Lake Biological Station
1 2 3 4 5 6 7 8 9 10 11 | #Samples taken from 3 depths with two samples each.
#Checking all samples against any deeper samples.
depth <- c(150, 150, 300, 300, 500, 500)
flux <- c(500, 480, 340, 300, 240, 250)
martincurveb(depth, flux)
#Same samples as above (3 depths with two samples each),
#but only comparing the shallowest depth against the two deeper groups.
depth <- c(150, 150, 300, 300, 500, 500)
flux <- c(500, 480, 340, 300, 240, 250)
martincurveb(depth, flux, rds = c(300, 500), tds = 150)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.