On Tue, 29 May 2007, Zhiliang Ma wrote:

> Hi R users,
>
> Is there a simple function that can add a folder into current R search path?

This works for adding libraries to your search path, but I don't think it 
would work for finding data files outside of your getwd() quite as you'd 
like:

.libPaths(c("/home/foo/R/library",.libPaths()))

> For example, suppose my current work directory is "D:\work", but my input
> files are stored in folder "C:\inFiles\",  I know I can change work
> directory or add "C:\inFiles\" before files name when I scan them, but I
> don't want to do that. I want to find a function that can simply add
> "C:\inFiles\" into R's search path, so that we I scan a file R will go to
> all the search paths to find it. In matlab, path(path,"C:\inFiles") will do
> this job, I'm just wondering if there is a similar function in R can do this
> job.
>
> Thanks,
> zhiliang
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
  Dr. David Forrest
  [EMAIL PROTECTED]                                    (804)684-7900w
  [EMAIL PROTECTED]                             (804)642-0662h
                                    http://maplepark.com/~drf5n/

______________________________________________
R-help@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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to