get.tsv.array: Generates tsv for array

Description Usage Arguments Details Value See Also

View source: R/copy.data.R

Description

Method generates tsv string for an array

Usage

1
2
get.tsv.array(type = list(name = "", type = "array", value = NULL, supported =
  T))

Arguments

type

The list of 4 values (as returned by detect.type):

name

name of the variable

type

should be array - not checked, not used

value

an array

supported

should be TRUE - not checked, not used

Details

1-dimensional array will be coverted to vector and method get.tsv.vector will be called. 2-dimensional array will be coverted to matrix and method get.tsv.matrix will be called. 3 and more dimensional array will be flattened to matrix and method get.tsv.matrix will be called. Matrix will have N+1 columns where N is a number of dimensions and M or M+1 rows, where M is a product of array dimensions. E.g. if array has following dimensions dim=c(2, 4, 2), then the output table will have N=3+1=4 columns and M=2*4*2=16 rows. If array dimensions are named then header row will be added. First N columns will be take names from dimensions names and the last column will be named after variable. Missing names will stay empty.

Value

tsv string

See Also

Other generate.tsv: get.tsv.data.frame, get.tsv.matrix, get.tsv.table, get.tsv.vector, get.tsv


sfr/RStudio-Addin-Snippets documentation built on May 29, 2019, 8:01 p.m.