Here is an update, still unsuccessful.
We contacted technical support, but have so far received no helpful suggestions.
We do have SAS maintenance release 3 with IML 9.22
I followed the PDF document on how to install R. Here is what I sent to tech support.
Note the error
ERROR: Could not find extension: (tkintr)
There are no files in our SAS installation with any name like that
-----------------------------------------------------------------------------
From: Robert H Creecy/CSRM/HQ/BOC
To: John Wesley McCue/SSD/HQ/BOC@BOC
Cc: Chad Eric Russell/SRD/HQ/BOC@BOC, Kyle A Johnson/SSD/HQ/BOC@BOC, Raymond Illian/CSVD/HQ/BOC@BOC
Date: 01/05/2011 10:32 AM
Subject: Re: Fw: update of IML on research2-1 not working
John,
So I queried the SAS IML forum at
http://support.sas.com/forums/thread.jspa?messageID=48202 and found out SAS/IML 9.22 on Linux should support
the R interface after all. The document at
http://support.sas.com/documentation/installcenter/en/iktkintrii/64028/PDF/default/install.pdf
(also attached) mentions how R should be installed and the user environment set up to enable the SAS/R interface.
There are three main technical points that need to be followed
1. R should be compiled and installed using the ./configure --enable-R-shlib
to create a shared object library.
2. The R_HOME environment variable should point to the root of the R installation, for 64 bit Linux default is /usr/lib64/R
3. R should be version 2.9.1 or later
We have two versions of R installed on research2-1, R-2.9.0 which is the default CSvD build installed in /usr/lib64/R
and R-2.11.0 installed in /apps/R/R-2.11.0/lib64/R
Both versions were compiled using the --enable-R-shlib, as reflected by an existing libR.so
(I compiled the R-2.11.0 version myself)
[creec003@research2-1 R]$ pwd
/apps/R/R-2.11.0/lib64/R
[creec003@research2-1 R]$ ls -l lib
total 12020
-rwxrwxr-x 1 creec003 srd-admin 18225 Apr 30 2010 libRblas.so
-rwxrwxr-x 1 creec003 srd-admin 2990923 Apr 30 2010 libRlapack.so
-rwxrwxr-x 1 creec003 srd-admin 9237971 Aug 12 13:53 libR.so
[creec003@research2-1 R]$
[creec003@research2-1 R]$ pwd
/usr/lib64/R
[creec003@research2-1 R]$ ls -l lib
total 12900
-rwxr-xr-x 1 root root 427786 Apr 17 2009 libRblas.so
-rwxr-xr-x 1 root root 3555235 Apr 17 2009 libRlapack.so
-rwxr-xr-x 1 root root 9184834 Apr 17 2009 libR.so
Here is the test SAS/IML program that fails trying to use R-2.11.0 and the files are attached
[creec003@research2-1 mysas]$ export R_HOME=/apps/R/R-2.11.0/lib64/R
[creec003@research2-1 mysas]$ cat imlcallR.sas
proc options option=RLANG;
run;
proc iml;
/* Comparison of matrix operations in IML and R */
print "---------- SAS/IML Results -----------------";
x = 1:3; /* vector of sequence 1,2,3 */
m = {1 2 3, 4 5 6, 7 8 9}; /* 3 x 3 matrix */
q = m * t(x); /* matrix multiplication */
print q;
print "------------- R Results --------------------";
submit / R;
rx <- matrix( 1:3, nrow=1) # vector of sequence 1,2,3
rm <- matrix( 1:9, nrow=3, byrow=TRUE) # 3 x 3 matrix
rq <- rm %*% t(rx) # matrix multiplication
print(rq)
endsubmit;
run;
[creec003@research2-1 mysas]$ sas -rlang imlcallR.sas
[creec003@research2-1 mysas]$ cat imlcallR.log
1 The SAS System 10:28 Wednesday, January 5, 2011
NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.2 (TS2M3)
Licensed to CENSUS BUREAU FOUNDATION LINA, Site 70070007.
NOTE: This session is executing on the Linux 2.6.18-194.26.1.el5 (LIN X64) platform.
You are running SAS 9. Some SAS 8 files will be automatically converted
by the V9 engine; others are incompatible. Please see
http://support.sas.com/rnd/migration/planning/platform/64bit.html
PROC MIGRATE will preserve current SAS file attributes and is
recommended for converting all your SAS libraries from any
SAS 8 release to SAS 9. For details and examples, please see
http://support.sas.com/rnd/migration/index.html
This message is contained in the SAS news file, and is presented upon
initialization. Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.
NOTE: SAS initialization used:
real time 0.88 seconds
cpu time 0.02 seconds
1 proc options option=RLANG;
2 run;
SAS (r) Proprietary Software Release 9.2 TS2M3
RLANG Support access to R language interfaces
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
3 proc iml;
NOTE: IML Ready
4 /* Comparison of matrix operations in IML and R */
5 print "---------- SAS/IML Results -----------------";
6 x = 1:3;
6 ! /* vector of sequence 1,2,3 */
7 m = {1 2 3, 4 5 6, 7 8 9};
7 ! /* 3 x 3 matrix */
8 q = m * t(x);
8 ! /* matrix multiplication */
9 print q;
10
11
12 print "------------- R Results --------------------";
13 submit / R;
14 rx <- matrix( 1:3, nrow=1) # vector of sequence 1,2,3
15 rm <- matrix( 1:9, nrow=3, byrow=TRUE) # 3 x 3 matrix
16 rq <- rm %*% t(rx) # matrix multiplication
2 The SAS System 10:28 Wednesday, January 5, 2011
17 print(rq)
18 endsubmit;
ERROR: The R language interface is not available on this system.
statement : SUBMIT at line 13 column 5
19 run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE IML printed page 1.
NOTE: PROCEDURE IML used (Total process time):
real time 0.47 seconds
cpu time 0.02 seconds
ERROR: Could not find extension: (tkintr)
ERROR: Errors printed on page 2.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 1.43 seconds
cpu time 0.06 seconds
[creec003@research2-1 mysas]$ cat imlcallR.lst
The SAS System 10:28 Wednesday, January 5, 2011 1
---------- SAS/IML Results -----------------
q
14
32
50
------------- R Results --------------------
[creec003@research2-1 mysas]$
From: John McCue
To: "'john.wesley.mccue@census.gov'" , "'robert.h.creecy@census.gov'"
Date: 01/06/2011 03:42 PM
Subject: Fw: [SAS 7610509911] Fw: update of IML on research2-1 not working
Hi Rob,
Did the suggestions from Rick or Joe solve the problem?
Q
----- Original Message -----
From: SAS Technical Support [mailto:support@sas.com]
Sent: Thursday, January 06, 2011 03:30 PM
To: John McCue
Subject: [SAS 7610509911] Fw: update of IML on research2-1 not working
::~:: NOTE: IF YOU REPLY, ALL TEXT FOLLOWING THIS LINE WILL BE IGNORED.
Hi John:
Please check back with the customer and ask them if the suggestions that Rick and Joe had for them worked or not.
Sincerely,
Rob Agnelli
Technical Support Statistician
SAS
NOTE: If you have any follow-up questions on this matter, please call or reply
to this email by January 13, 2011.