Re: [R] Regarding {KernSmooth} - Can a package on CRAN have non GPL copyrights?

2011-02-12 Thread Murray Stokely
On Sat, Feb 12, 2011 at 11:57 AM, Tal Galili tal.gal...@gmail.com wrote:
 Hi all,
 I'm not sure who to ask this, so I'm posting this here.

 I just ran:
  require(KernSmooth)
 And got (I bolded the text):
 Loading required package: KernSmooth
 KernSmooth 2.23 loaded
 *Copyright M. P. Wand 1997-2009*
 Warning message:
 package 'KernSmooth' was built under R version 2.12.1

 What does that mean?

There are many licenses used on CRAN, such as BSD, MIT, GPL, LGPL, and
public domain.  There are even some that aren't really open source at
all such as 'akima' and 'SparseM'.  These packages make additional
restrictions such as that a license is only granted for academic /
non-commercial use.  It's particularly annoying that many other
packages without such restrictions depend on these packages, making it
pretty difficult to ensure license compliance for companies using R.

The fact that the code is Copyright by that author is somewhat
orthogonal to the license he chooses to distribute it under.  See the
LICENSE file.  In this case, it's much more open than GPL -- it is
completely unrestricted / public domain.  After reading the license
for the package you are interested in, you may like to read how those
licenses are interpreted by e.g.

   http://www.opensource.org/licenses/index.html

 - Murray

__
R-help@r-project.org 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.


[R] Creating truly global variable within function within namespace

2010-10-28 Thread Murray Stokely
I am trying to create a function with a package with a NAMESPACE that
will save() some variables, distribute an Rdata file to another
computer, where it will be load()ed.  The problem is that this load()
tries to load the namespace of the package on the original computer
that created the .Rdata file, but this package need not be loaded on
the new computer.

This example function is in a package in a namespace :

create.global.function - function(x, FUN, ...) {
  environment(FUN) - .GlobalEnv
  assign(.GLOBAL.FUN, function(x) { FUN(x, ...) }, env=.GlobalEnv)
  environment(.GLOBAL.FUN) - .GlobalEnv
  save(list = ls(envir = .GlobalEnv, all.names = TRUE),
   file = /tmp/.Rdata,
   envir = .GlobalEnv)
}

And then if I quit my session and then try to load(/tmp/.Rdata)
without loading the package, it will try to loadNamespace from the
.Rdata file and then fail.

Is it possible to fully strip the namespace out of the .GLOBAL.FUN
before I save() it such that it can be loaded into other R instances
without trying to load the namespace?

Thanks for any pointers ..

 - Murray

__
R-help@r-project.org 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.