MyNixOS website logo
Description

Read and Write FWF Files in the 'Blaise' Format.

Can be used to read and write a fwf with an accompanying 'Blaise' datamodel. Blaise is the software suite built by Statistics Netherlands (CBS). It is essentially a way to write and collect surveys and perform statistical analysis on the data. It stores its data in fixed width format with an accompanying metadata file, this is the Blaise format. The package automatically interprets this metadata and reads the file into an R dataframe. When supplying a datamodel for writing, the dataframe will be automatically converted to that format and checked for compatibility. Supports dataframes, tibbles and LaF objects. For more information about 'Blaise', see <https://blaise.com/products/general-information>.

Blaise R package

This package provides function for reading and writing blaise fixed width files with a datamodel (usually with extension .bla) symmetrically. Symmetry in this case means that reading a dataset in R and then immediately writing it out, should result in the exact same dataset and datamodel.

All types except arrays are currently supported. Datamodels have only been tested as separate files, so datamodels within larger manipula or maniplus scripts for instance are not guaranteed to work. Datamodels from questionnaires are also mostly untested. Known limitations at this point are the NODK and NORF options, but there are likely to be more.

In addition, an R dataframe can be forced to conform to a known blaise datamodel. For this to work variable names in the dataframe need to match the datamodel. a simple name matching scheme based on minimizing the Levenshtein distance is supplied.

Since blaise and R datatypes don't exactly overlap, some are automatically converted:

  • R Logical type is always converted to an INTEGER with FALSE:0 and TRUE:1 when writing.
  • numbered blaise enums are converted to factors with the numbers as labels. The original labels are therefore lost. (possibly will be implemented as new R vector in the future). This can be suppressed, but the default is to convert due to the symmetric design principle.

For reading fwf files an option is available to output LaF objects. In this way the package is used as an alternative datamodel parser for the LaF package.

R-CMD-check R-CMD-check

Metadata

Version

1.3.11

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows