snap.write.block.2: Function to add blocks to an existing Gadget snapshot format...

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/snap.write.block.2.R

Description

Function to add blocks to an existing format 2 snapshot file. First it checks the data input and uses snap.select.type.2 to define block properties. Then it writes the LABEL block and the DATA block.

Usage

1
snap.write.block.2(file, label, inp, ndim, type)

Arguments

file

Name of the file to be opened to append the blocks.

label

LABEL of the block to be added.

inp

Input array of data. In general a data frame if dim of 3, then x,y,z are expected in the data frame.

ndim

OPTIONAL: dimensions of the input array usually 3 or 1 dimentions.

type

OPTIONAL/DEPRECATED.

Value

No value returned. Called for the side-effect of writing out a binary Gadget format-2 snapshot file.

Note

Note that you need already a file with a header. You can generate it with snap.write.head.2.

Author(s)

Federico Stasyszyn

See Also

snap.read.2, snap.add.head.1, snap.write.head.2, snap.gen.param

Examples

1
    #None yet!

asgr/snapshot documentation built on Oct. 8, 2020, 2:52 p.m.