Last data update: 2014.03.03

R: Makes pictures of survival.
picSurvR Documentation

Makes pictures of survival.

Description

Produces figures of value for assessing survival fit given data.

Usage

picSurv(dataf, survObj, ncuts = 20, makeTitle = "Survival", ...)

Arguments

dataf

a dataframe with columns ‘size’ and ‘sizeNext’(‘size’ is continuous stage variable at t, ‘sizeNext’ is continuous stage at t+1); facultatively, dataf may include ‘covariate’ and ‘covariateNext’ for a single discrete covariate, indicating values at t, and at t+1, respectively; these must take values of sequential integers, starting at ‘1’. For models fitting growth increment, 'incr' or 'logincr' may be directly provided as a column in the dataframe, otherwise they are calculated as dataf$sizeNext-dataf$size or log(dataf$sizeNext-dataf$size), respectively.

survObj

an object of class survObj.

ncuts

number of consecutive values for which means of survival and continuous (e.g. size) stage are taken for the plotting.

makeTitle

character that defines title, defaults to "Survival"

...

extra arguments to plot (e.g, ylim, etc).

Value

Returns nothing.

Author(s)

C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.

See Also

makeSurvObj, picGrow

Examples

dff <- generateData()
sv1 <- makeSurvObj(dff)
picSurv(dff,sv1)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(IPMpack)
Loading required package: Matrix
Loading required package: MASS
Loading required package: nlme
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IPMpack/picSurv.Rd_%03d_medium.png", width=480, height=480)
> ### Name: picSurv
> ### Title: Makes pictures of survival.
> ### Aliases: picSurv
> 
> ### ** Examples
> 
> dff <- generateData()
> sv1 <- makeSurvObj(dff)
> picSurv(dff,sv1)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>