Re: [R] search path question

From: David Forrest <drf5n_at_maplepark.com>
Date: Tue, 29 May 2007 12:35:03 -0500 (CDT)

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_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
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
  Dr. David Forrest
  drf_at_vims.edu                                    (804)684-7900w
  drf5n_at_maplepark.com                             (804)642-0662h
                                    http://maplepark.com/~drf5n/

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 29 May 2007 - 17:45:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 May 2007 - 18:31:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.