Description Usage Arguments Details Value See Also Examples
The function filters out all the unobserved information from a ‘sample.lt’ object, leaving only the observed data. It is useful when creating sample.lt objects for exercises – when you don't want those doing the exercises to be able to see the whole population.
1 | obscure(sample)
|
sample |
Line transect sample object (of class ‘sample.lt’). |
This function removes from the ‘sample.lt’ object all data relating to animals and groups that were not detected – those for which ‘(sample$detected==T & !is.na(sample$detected))’.
obscure.sample.lt
returns an object of class 'sample.lt´ which has the following elements:
population |
object of class 'population´, but containing only data for observed members of the population. |
design |
object of class 'design.lt´. |
detected |
vector indicating which animal groups have been detected. |
distance |
vector of perpendicular distances of detected animal groups inside the survey units from the respective transect paths. |
transect |
vector of transect path numbers of detected animal groups. |
parents |
Details of WiSP objects passed to function |
created |
Creation date and time |
generate.sample.lt
, setpars.survey.lt
summary.sample.lt
, plot.sample.lt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | reg<-generate.region(x.length = 50, y.width = 80)
dens <- generate.density(reg)
pop.pars<-setpars.population(reg, density.pop = dens, number.groups = 100, size.method = "poisson", size.min = 1,
size.max = 5, size.mean = 1, exposure.method = "beta", exposure.min = 2, exposure.max = 10, exposure.mean = 6,
exposure.shape = 1)
pop<-generate.population(pop.pars)
lt.des.pars<-setpars.design.lt(reg, n.transects = 4, n.units = 20, visual.range = 2, percent.on.effort = 0.7)
lt.des<-generate.design.lt(lt.des.pars)
lt.surv.pars<-setpars.survey.lt(pop, lt.des, disthalf.min = 1, disthalf.max = 2)
lt.samp<-generate.sample.lt(lt.surv.pars)
# now strip the unobserved data out of the sample.lt object:
lt.obs.samp<-obscure(lt.samp)
# (Note: `lt.obs.samp<-obscure.sample.lt(lt.samp)' has the same effect.)
plot(lt.obs.samp,whole.population=TRUE)
# note that `whole.population=T' has no effect - because all unobserved data is gone
summary(lt.obs.samp)
# ... but the summary is the same - because summary involves only the observed data
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.