Last data update: 2014.03.03

R: Sorts dates in ascending order and generates state sequence...
Sequences.ind.0R Documentation

Sorts dates in ascending order and generates state sequence (path).

Description

Sorts dates in ascending order: earlier dates come first. The function also generates state sequences (life path or career path). The function is used in generating a Biograph object from raw data. The state sequence is the path variable of the Biograph object.

Usage

Sequences.ind.0 (d,namstates,absorb)

Arguments

d

Vector of dates

namstates

state labels (labels of single characters)

absorb

Vector of absorbing states

Value

namstates

Labels of the states in the state space.

d

Sorted dates

path

Character variable of state sequences. This variable is the 'path' variable in the Biograph object.

Author(s)

Frans Willekens

Examples

	d <- c(300,250,340)  # dates in CMC
	f<- Sequences.ind.0 (d,c('A','B','C'))
   

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(Biograph)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Biograph/Sequences.ind.0.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Sequences.ind.0
> ### Title: Sorts dates in ascending order and generates state sequence
> ###   (path).
> ### Aliases: Sequences.ind.0
> 
> ### ** Examples
> 
> 	d <- c(300,250,340)  # dates in CMC
> 	f<- Sequences.ind.0 (d,c('A','B','C'))
>    
> 
> 
> 
> 
> dev.off()
null device 
          1 
>