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