From rowe at muxspace.com  Fri Aug 23 02:37:23 2013
From: rowe at muxspace.com (Brian Lee Yung Rowe)
Date: Thu, 22 Aug 2013 20:37:23 -0400
Subject: [Rd] legitimate use of :::
In-Reply-To: <CAJoaRhZ_fRG2vuUk-dkXa6JwG4zYK2eDDTzw4BXQJFmWxwV92Q@mail.gmail.com>
References: <CANROs4dyoRyjoVHZLs7wDrFrjVX-1zvTTv2i4tBzF3f6Rx-XTA@mail.gmail.com>
	<5215F9BD.5030009@statistik.tu-dortmund.de>
	<52165F15.1090500@yorku.ca>
	<CABdHhvENvyTD6dPtbQzNaGqgwHNtV86juZh=5F7oBQSPJhO1Rw@mail.gmail.com>
	<BA069179-9E70-4CCE-BD8E-CCB01988B68E@muxspace.com>
	<CAP01uRnuo9kFwbDpmZrQhkF5Mo5EW5LZt623o6b7N7F804Rp0Q@mail.gmail.com>
	<ABEAF14C-9D05-4878-9A15-3FC9728C7951@muxspace.com>
	<521693A6.5030407@statistik.tu-dortmund.de>
	<CAJoaRhZ_fRG2vuUk-dkXa6JwG4zYK2eDDTzw4BXQJFmWxwV92Q@mail.gmail.com>
Message-ID: <6BEDBBD2-D3A3-4271-8376-2A20199D73EA@muxspace.com>

This is what I was getting at as well. It would be great to have a call like

require(package, c('funtion.1','function.2')) 

or similar that gives users granular control over what gets imported in the shell. I would be drunk with joy if the same mechanism could be used to automatically populate the package directives.


On Aug 22, 2013, at 8:01 PM, Peter Meilstrup <peter.meilstrup at gmail.com> wrote:

> It would be nice if the functionality of importFrom() and import() were
> available to user level code, rather than just to people building packages
> for distribution. One most often encounters namespace conflicts at the user
> level, when loading two packages that have no logical connection other than
> both bearing on your problem of the moment.
> 
> R conflates "having namespaces" with "having a library distribution
> mechanism" and while its library distribution mechanism is top notch, most
> modern languages do not require you to learn the distribution procedure in
> order to just have namespaces.
> 
> For instance, in Python you merely put code in a file called foo.py and
> then in any other file in the same directory you type "import functionName
> from foo". I.E. using namespaces does not require you to build/install
> packages. Python namespaces are also hierarchical so that the question of
> this thread would easily be resolved by putting functions into
> foo._internal and in other packages typing import * from "foo._internal"
> 
> Peter
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] legitimate use of :::
Brian Lee Yung Rowe