Прочитать файл данных.ssd01 из (древней) SAS версии 6 (для Python/R)

Анализируя некоторые данные из довольно старой академической статьи, я получил несколько файлов данных, которые были созданы еще более старой частью программного обеспечения, а именно 20-летней версией SAS 6 (.ssd01 расширение).

Как бы вы преобразовали этот файл в современный формат для анализа с помощью R, Python и т. Д.? Бонусные (щедрые) баллы, если процесс не требует получения лицензии SAS или другого коммерческого программного обеспечения.

подсказки:

Вот файлы на случай, если кто-то захочет испачкать руки (нет, это не вирусы, а только данные из вышеприведенного документа):

swallco.ssd01, swallpd.ssd01

1 ответ

Решение

Я просто взял демо-версию 64-битной версии программного обеспечения для Windows с https://www.stattransfer.com/ и применил ее к вашему первому файлу с запросом вывода в формате csv. Вот первые несколько строк результата.

"TIME","PLAYERID","PLAY","PAY","N1","N1PLAY","N1PAY","N2","N2PLAY","N2PAY","N3","N3PLAY","N3PAY","N4","N4PLAY","N4PAY","NN","N5","N5PLAY","N5PAY","N6","N6PLAY","N6PAY","N7","N7PLAY","N7PAY","ACTION","N1ACT","N2ACT","N3ACT","N4ACT","N5ACT","N6ACT","N7ACT","NETWORK","GAME","SESSION","LAGACTON","N1ACTO","N2ACTO","N3ACTO","N4ACTO","N5ACTO","N6ACTO","N7ACTO","ACTS","LAGACTS","PROPORT","LAGPROP","GRAPH","CLUSTER","LENGHT"
    2,0,"B",3.2,1,"A",2,2,"A",2,17,"B",3.2,16,"A",2,4,,"",,,"",,,"",,0,1,1,0,1,,,,"local","co","colc1fir",,1,1,0,1,0,0,0,3,,0.75,,"local",0.5,2.647
    3,0,"A",0.5,1,"B",2.5,2,"B",2.5,17,"B",2.5,16,"A",0.5,4,,"",,,"",,,"",,1,0,0,0,1,,,,"local","co","colc1fir",0,0,0,0,1,0,0,0,1,3,0.25,0.75,"local",0.5,2.647
    4,0,"B",2.5,1,"A",-1,2,"B",1.8,17,"B",3.2,16,"A",0.5,4,,"",,,"",,,"",,0,1,0,0,1,,,,"local","co","colc1fir",1,1,0,0,1,0,0,0,2,1,0.5,0.25,"local",0.5,2.647
    5,0,"B",2.5,1,"B",2.5,2,"A",-1,17,"A",0.5,16,"B",3.2,4,,"",,,"",,,"",,0,0,1,1,0,,,,"local","co","colc1fir",0,0,1,1,0,0,0,0,2,2,0.5,0.5,"local",0.5,2.647
    6,0,"A",2,1,"B",2.5,2,"A",2,17,"B",3.2,16,"A",3.5,4,,"",,,"",,,"",,1,0,1,0,1,,,,"local","co","colc1fir",0,0,1,0,1,0,0,0,2,2,0.5,0.5,"local",0.5,2.647
    7,0,"B",1.8,1,"B",1.8,2,"B",2.5,17,"B",2.5,16,"A",2,4,,"",,,"",,,"",,0,0,0,0,1,,,,"local","co","colc1fir",1,0,0,0,1,0,0,0,1,2,0.25,0.5,"local",0.5,2.647
    8,0,"A",2,1,"B",2.5,2,"B",2.5,17,"A",3.5,16,"A",3.5,4,,"",,,"",,,"",,1,0,0,1,1,,,,"local","co","colc1fir",0,0,0,1,1,0,0,0,2,1,0.5,0.25,"local",0.5,2.647
    9,0,"B",2.5,1,"B",1.8,2,"B",1.8,17,"A",2,16,"A",3.5,4,,"",,,"",,,"",,0,0,0,1,1,,,,"local","co","colc1fir",1,0,0,1,1,0,0,0,2,2,0.5,0.5,"local",0.5,2.647
    10,0,"B",1.8,1,"B",1,2,"B",1.8,17,"B",2.5,16,"A",2,4,,"",,,"",,,"",,0,0,0,0,1,,,,"local","co","colc1fir",0,0,0,0,1,0,0,0,1,2,0.25,0.5,"local",0.5,2.647
    11,0,"B",3.2,1,"A",0.5,2,"B",1.8,17,"A",3.5,16,"A",3.5,4,,"",,,"",,,"",,0,1,0,1,1,,,,"local","co","colc1fir",0,1,0,1,1,0,0,0,3,1,0.75,0.25,"local",0.5,2.647
    12,0,"B",2.5,1,"A",0.5,2,"B",2.5,17,"B",3.2,16,"A",2,4,,"",,,"",,,"",,0,1,0,0,1,,,,"local","co","colc1fir",0,1,0,0,1,0,0,0,2,3,0.5,0.75,"local",0.5,2.647
    13,0,"B",2.5,1,"A",0.5,2,"B",3.2,17,"B",3.2,16,"A",0.5,4,,"",,,"",,,"",,0,1,0,0,1,,,,"local","co","colc1fir",0,1,0,0,1,0,0,0,2,2,0.5,0.5,"local",0.5,2.647
    14,0,"B",3.2,1,"A",2,2,"A",3.5,17,"B",3.2,16,"A",2,4,,"",,,"",,,"",,0,1,1,0,1,,,,"local","co","colc1fir",0,1,1,0,1,0,0,0,3,2,0.75,0.5,"local",0.5,2.647

Я понятия не имею, насколько это хорошо!:) Нет, я не связан ни с какими компаниями, которые производят или продают это. И нет, я никогда даже не пробовал это раньше. Теперь вы знаете обо всем (почти), что я знаю.

Удачи.

Другие вопросы по тегам