Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.58.0602281401110.24524@amadeus.statistik.uni-dortmund.de>
Date: 2006-02-28T13:01:43Z
From: Uwe Ligges
Subject: relative referencing for filenames &etc
In-Reply-To: <20060227201201.51950.qmail@web37107.mail.mud.yahoo.com>

On Mon, 27 Feb 2006, Greg Tarpinian wrote:

> BACKGROUND:
> I use SAS on a daily basis and one of its most powerful features in a
> production environment is the use of LIBNAME and FILEREF statements, e.g.:
> 
> 
> PROC PRINTTO LOG = "&LOGDIR.\data processing.log" NEW;
> RUN;
> PROC IMPORT 
> 	DATAFILE= "&DATADIR.\blah.xls"
> 	OUT = TEMP
> 	DBMS = EXCEL REPLACE;
>     SHEET = "Sheet1"; 
>     GETNAMES = YES;
> RUN;
> 
> 
> Properly setting up SAS Shortcuts in the WinXP environment, or (say)
> the UNIX equivalent of batch files in the UNIX environment will cause
> SAS to autoexecute (say) an INIT.SAS file that automatically assigns
> the LOGDIR and DATADIR macro variables used above.  This is extremely
> convenient because it makes the SAS code more portable from project to
> project.
> 
> 
> MY QUESTION:
> Is it possible to use this kind of relative file and directory referencing
> from within R?

Perhaps you are looking for ?setwd

Uwe ligges
 
> 
> Kind regards,
> 
> 
>       Greg
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>