Learn R Programming

sequence (version 2.0)

read.series.seq: Reads a series of sequences.

Description

Input from a text file of a series of behavioral (or any other type) sequences. Builds an object of class sequence

Usage

read.series.seq(fich = NULL)

Arguments

fich

character: name of the text file to read

Value

An object of class sequence

Details

The text file must have one line by sequence. Each line must begin by a character identifier of the sequence, followed by a tab character or a space, followed by the series of item codes, separated also by tabs or spaces. example: A1 A B A C D A B C A2 A D D C A B A3 B D C A D A B C A4 C B C A A5 C D A B C

See Also

compseq

Examples

Run this code
# NOT RUN {
sink("series-seq")
cat("A1 A B A C D A B C\n")
cat("A2 A D D C A B\n")
cat("A3 B D C A D A B C\n")
cat("A4 C B C A\n")
cat("A5 C D A B C\n")
sink()
read.series.seq("series-seq")
file.remove("series-seq")
# }

Run the code above in your browser using DataLab