write.TSD_collapse_string: Function used for collapsing string vectors, arrays or lists...

View source: R/write.TSD_collapse_string.R

write.TSD_collapse_stringR Documentation

Function used for collapsing string vectors, arrays or lists to strings of length 1 at each time step (only used on elements of the data that are recognized as string type).

Description

Function used for collapsing string vectors, arrays or lists to strings of length 1 at each time step (only used on elements of the data that are recognized as string type).

Usage

write.TSD_collapse_string(y, numt, split_char = "\037", ts = "last")

Arguments

y

is a string vector to collapse into a single string with split_char filled in between the vector elements.

numt

is the number of time steps.

split_char

is a character used to split strings into vector elemens when restoring the vector.

ts

is a numeric vector specifying the rules for regarding the last dimensions of arrays as time: If the number of dimensions of an array is included in the set 'ts' the last dimension of that array is considered to be along time, so that if ts=3 and we wish to write an array of dimension [3, 4, 2], this array will be written as two [3, 4] arrays. 'ts' is utilized through seq_along(dim(x))[ts], so that if ts=-2 matrices are not regarded as having time along the second dimension.


arnejohannesholmin/TSD documentation built on April 14, 2024, 5:29 a.m.