apsimx_filetype {apsimx}R Documentation

Test file format for .apsimx files

Description

Test whether an .apsimx file is XML or json

Usage

apsimx_filetype(file = "", src.dir = ".")

Arguments

file

file ending in .apsimx to be tested

src.dir

directory containing the .apsimx file to be tested; defaults to the current working directory

Value

‘xml’, ‘json’ or ‘unknown’

Note

Minimal function which reads only the first line in a file and tries to guess whether it is an ‘xml’ or ‘json’ file type.

Examples


extd.dir <- system.file("extdata", package = "apsimx")
apsimx_filetype("Wheat.apsimx", src.dir = extd.dir) 



[Package apsimx version 2.6.2 Index]