Tuesday, September 15, 2015

SAS: SAS on the Mac

I have little experience with the Mac, and no experience with SAS on the Mac. Some of my students had trouble running SAS on the Mac. One of my students sent me this message. Saving it here just in case...



1. Exit the VM

2. Go to 'Terminal'

3. Type    sudo nvram boot-args=debug=0x10

4. Run the VM again and the bug will be fixed



R: Dataframe slice example

R dataframe slice example.

Note: slice = whole[rows satisfying this condition, tuple of column names]



    > head(mywhole)
      obs ew id ba x
    1   1  E  1  B 8
    2   2  E  1  A 9
    3   3  E  2  B 4
    4   4  E  2  A 3
    5   5  E  3  B 6
    6   6  E  3  A 7
    > myslice = mywhole[ba=="B", c("id","x")]
    > myslice
       id x
    1   1 8
    3   2 4
    5   3 6
    7   4 6
    9   5 5
    11  6 9
    13  7 6
    15  8 5
    17  9 7
    19 10 9