fix_headers: Fix data headers in Gadget input files

View source: R/compat.R

fix_headersR Documentation

Fix data headers in Gadget input files

Description

Recent revisions of RGadget introduced the gadgetfile class, which is a fairly flexible S3 class to interact with Gadget input files. To ensure that data object are read properly, i.e. as data.frame, the following header needs to be inserted to indicate that the following sections indicate data

; -- data --
; col1 col2 ...

This function attempts to translate older gadget models, i.e. those not developed using Rgadget, to the new format

Usage

fix_headers(main.file = "main", path = ".")

Arguments

main.file

name of the main file

path

location of the gadget model directory

Examples

## Not run: 
fix_headers()

## End(Not run)

bthe/rgadget documentation built on July 22, 2022, 7:24 a.m.