Giter Club home page Giter Club logo

exportsas's Introduction

This R function just aims at constituting an alternative to the function write.foreign from the package foreign. The existing write.foreign misses several features that may be useful when translating R data into SAS:

  • Labels for the variables (since it is now very well handled in R with the tibble object, especially when using RStudio); the labelling process relies on the function label from the library Hmisc.
  • Possibility to switch on/off the PROC FORMAT applied to factors. When the labelling of the values is switched off, the choice has been made to write the numerical value of the levels (instead of the character string of the label, which would be more demanding in terms of memory).
  • Management of possible different end-of-line characters, in particular when R and SAS are working on different OSs.
  • An issue with missing values in character variables existing in write.foreign has been solved in this function.

Additionally, this function is meant to work along with SAS: the script generates txt files and SAS scripts that must then be run on a SAS session in order to import the data into SAS (just as write.foreign already does). There is also the library haven that enables to directly exports R dataframes into SAS tables; however, it seems that depending on the version of SAS that is used, the tables turn sometimes not to be readable.

exportsas's People

Contributors

pierre-lamarche avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.