Dear Experts,
I've got SPSS V19.0 and I've downloaded the programability extension for R, but when I attempt to run R scripts nothing seems to happen, the code is directly printed into the output window, with none of the operations appearing to have worked.
There is little documentation surrounding the subject on the ibm site or in the manuals, any help would be greatly appreciated.
here's the code:
Begin program R.
library (SPSS, version = 19.0)
bob=spssdata.GetDataFromSPSS()
age=(1,2,3,4,5,6,7,8,9)
End program .
Begin program R.
library (SPSS, version = 19.0)
bob=spssdata.GetDataFromSPSS()
mean(age)
print()
dict = spssdictionary.CreateSPSSDictionary(resp, int, pred) spssdictionary.SetDictionaryToSPSS(“results”, dict)
new = data.frame(bob)
spssdata.SetDataToSPSS(“results”, new)
spssdictionary.EndDataStep( )
End program .
Begin program R.
library (SPSS, version = 19.0)
age=spssdata.GetDataFromSPSS(variables=c("age"))
Print(mean(age))
End program.
begin program R.
print(2*2)
end program.
"Lo there do I see my father. Lo there do I see my mother and my sisters and my brothers. Lo there do I see the line of my people, back to the beginning. Lo, they do call to me, they bid me take my place among them, in the Halls of Valhalla, where the brave may live...forever."