Skip to main content


Lifelines2 Input Format

 

 

LifeLines2 Basic Input Format

The basic input format for Lifelines2 is a plaintext file with 3 columns, separated by tabs.

ID

Event Type

Date/Time

Example:

Explanation:

File Format

 

There are three columns.  Each column is separated from the previous one by a tab character.  Do not include a header.

 

Each row describes "what happens to whom when".  The first column describes "who".  The second column describes "what", and the third column describes "when".

 

The first column is a list of ID's.  The ID's can be string of any characters (letters, numbers, punctuation marks, but no tab character).

 

The second column is a list of events.  It can also be string of any characters (letters, numbers, punctuation marks, but no tab character).

The third column is a list of date/time.  In this example, only date is recorded.  But time can also be recorded.  Please see below for the acceptable date/time formats.

 

Notice that the rows need not be ordered.  All rows with the same ID need not be consecutively placed, nor need the date/time be chronologically ordered. 

 

Please note that if the input file has extra columns or that it has a header row, then Lifelines2 will reject it as an invalid input file.

 

Download this example (simpleExample.txt) 

 

 

File Extension

 

There is no restriction on the file extension for this plain text file.  Although .txt is the most common extension.  Lifelines2 will load a file if it conforms to the 3-column format, regardless of the extension.  The benefit of using a .txt extension is that it will allow you to quickly edit the file using a text file editor.

 

 

File Creation and Edit

 

You can create a file that conforms to this format by using Microsoft Excel or other spreadsheet programs.  Each column here will correspond to a column in the spreadsheet.  Each row will correspond to a row in the spreadsheet.

 

The important part is when you save your spreadsheet, you should choose to save it as a tab-delimited text file.  For example, in Microsoft Excel, you would choose to save the file as "Text (Tab delimited) (*.txt)".

 

Acceptable Date/Time Formats in Lifelines2

Format

Example

YYYY-MM-DD hh:mm:ss.SSS

2001-11-5 12:43:12.543

YYYY-MM-DD hh:mm:ss

2005-1-1 21:4:21

2003-12-14 2:43:11

YYYY-MM-DD hh:mm

2007-3-26 21:10

2006-12-22 3:22

YYYY-MM-DD

2001-11-24

1997-1-6

 

back to Lifelines2