New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

jstata

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstata

NodeJS Stata Module

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

jstata

NodeJS module to read and write Stata files

It depends on libjansson-dev. A static copy is available as part of the repository.

You can also install it directly using npm.

var js = require("jstata");
var stata_file = js.stataRead('filename.dta');
console.log(stata_file);

var exportData = {
  data: [
    ['hi',1],
    ['wee',2]
  ],
  metadata: {
      timestamp: '21 Oct 2015 23:26',
      observations: 2,
      variables: 2,
      datalabel: 'JStata',
      version: 10,
      nlabels: 1,
  },
  variables: [
    {
      vfmt: '%3s',
      name: 'message',
      dlabels: 'message variable',
      vlabels: '',
      valueType: 3
    },
    {
      vfmt: '%9.0g',
      name: 'number',
      dlabels: 'number variable',
      vlabels: 'TYesNo',
      valueType: 253
    }
  ],
  labels:{
    'TYesNo': [
        [1, 'Yes'],
        [2, 'No' ]
      ]
  }

}; 


js.stataWrite('export.dta', exportData);

Keywords

stata

FAQs

Package last updated on 05 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts