Giter Club home page Giter Club logo

sas-install-github's Introduction

sas-install-github

This repository contains SAS code for downloading and installing other SAS code directly from GitHub.

  1. Manually download this repository.
  2. %include the %install_github macro into your SAS session.
  3. Never manually download or %include another GitHub repository for the rest of your SAS career!

Here is an example of installing a single-file macro using %install_github.

*--- point to your local copy of install_github ---;
%include "S:\Basestat\Autocall\install_github.sas";

*--- install a single file from GitHub ---;
%install_github
    (repo=RhoInc/sas-violinPlot
    ,file=src/violinPlot.sas
    )
    
*--- use the newly-installed macro ---;
%violinPlot    
    (data = sashelp.cars 
    ,outcomeVar = mpg_city 
    ,outPath = C:\temp
    ,outName = violin_folder
    );

Here is an example of installing a multi-file macro using %install_github.

*--- point to your local copy of install_github ---;
%include "S:\Basestat\Autocall\install_github.sas";

*--- install a folder full of files from GitHub ---;
%install_github
    (repo=RhoInc/sas-codebook
    ,folder=Macros
    )

*--- use the newly-installed macro ---;
%codebook_generic
    (data=sashelp.class
    ,pdfpath=C:\temp
    )

While the SAS macro takes the inspiration for its name from the corresponding R package, because of fundamental differences in how SAS and R work, the SAS macro behaves somewhat differently than the R package. In particular, the SAS macro does not try to save the code being accessed. The SAS macro reads the code into your session directly from the web and does not save a local copy. The implicit assumption behind this behavior is that the only reason to save a local copy of SAS code that lives on GitHub would be if you wanted to modify it in some way. In which case, you would no longer need to point to GitHub. So, if you're pointing to GitHub to get the macro, it's either because (a) you scoff at the tedious manual process of using the [Clone/Download] button or (b) you want be sure you are using the most current version of the code with all of the latest bug fixes.

sas-install-github's People

Contributors

srosanba avatar samussiah avatar

Stargazers

 avatar Vignesh Thanikachalam avatar

Watchers

James Cloos avatar Jeremy Wildfire avatar  avatar Rich Budrevich avatar Vignesh Thanikachalam avatar

Forkers

han-tun

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.