How do you GET DATA in SPSS syntax for a URL rather than local file?

StackOverflow https://stackoverflow.com/questions/22724130

  •  23-06-2023
  •  | 
  •  

문제

If you put a URL into the file path of SPSS syntax GET DATA /FILE="http:..." it doesn't work. Any suggestions to get the program to call the dataset from the web? Or is this just a program specific limitation?

도움이 되었습니까?

해결책

There is an extension SPSS GETURI DATA available from SPSS that allows you to open up sav, excel, sas or Stata datasets from online.

Otherwise you can't do it directly, but you can use the HOST command to set a prompt to download a file and then open it. Something like below (for my Windows machine after installing wget):

HOST = ['cd "your drive here"','wget http://www.yoururl.com/yourfile.sav'].

And then you should be able to open the file using normal SPSS syntax.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top