Re: [Rd] RApache error on RHEL/CentOS

2011-07-23 Thread Simon Urbanek

On Jul 23, 2011, at 4:28 PM, Jeroen Ooms wrote:

> I am running RApache (www.rapache.net) on CentOS 5.6 using the R
> binary from EPEL. After upgrading to R from 2.12 to 2.13 I am getting
> the following error when starting Apache:
> 
> Cannot load /usr/lib/httpd/modules/mod_R.so into server: libgomp.so.1:
> shared object cannot be dlopen()ed
> 
> I tried rebuilding RApache, but the error remains. Installed are:
> 
> R-devel.i386 2.13.0
> libgomp.i386 4.1.1-52.el5.2
> httpd (apache) 2.2.3
> rapache 1.1.4
> 
> Has anything changed in R 2.13 that might cause this issue?
> 

Yes, R 2.13.0 uses OpenMP. You can compile R without gomp using  
--disable-openmp

Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] RApache error on RHEL/CentOS

2011-07-23 Thread Jeroen Ooms
I am running RApache (www.rapache.net) on CentOS 5.6 using the R
binary from EPEL. After upgrading to R from 2.12 to 2.13 I am getting
the following error when starting Apache:

Cannot load /usr/lib/httpd/modules/mod_R.so into server: libgomp.so.1:
shared object cannot be dlopen()ed

I tried rebuilding RApache, but the error remains. Installed are:

R-devel.i386 2.13.0
libgomp.i386 4.1.1-52.el5.2
httpd (apache) 2.2.3
rapache 1.1.4

Has anything changed in R 2.13 that might cause this issue?

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Start-up messages when Importing from a package

2011-07-23 Thread Prof Brian Ripley

The message is from maptools (as it says), not sp.

No, there is nothing you can do when dependent packages put out 
messages.  You could ask the maintainer not to put the message out 
when rgeos is available 


On Fri, 22 Jul 2011, Mauricio Zambrano-Bigiarini wrote:


Dear List,

I'm building a package  that uses 2 functions of the 'sp' package, and I 
declared them in my NAMESPACE file as follow:



importFrom("sp", proj4string, coordinates)


The package is built without any problem, but when I load the package, I get 
the following message:


"
Loading required package: sp

   Note: polygon geometry computations in maptools
   depend on the package gpclib, which has a
   restricted licence. It is disabled by default;
   to enable gpclib, type gpclibPermit()

Checking rgeos availability as gpclib substitute:
TRUE
"


However, if I only load the 'sp' package (in a different R session), I don't 
get any warning message.



Is there any way I can prevent the warning message appears when I load my 
package ?



Thanks in advance for any help,


Mauricio Zambrano-Bigiairni
--
===
FLOODS Action
Land Management and Natural Hazards Unit
Institute for Environment and Sustainability (IES)
European Commission, Joint Research Centre (JRC)
webinfo: http://floods.jrc.ec.europa.eu/
===
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:11}}

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Best practices for writing R functions

2011-07-23 Thread Alireza Mahani
The fact that R doesn't automatically copy the function argument is very
useful when you mainly want to pass arguments to another function. Thanks to
all of you for mentioning this!

Another trick to reduce verbosity of code (and focus on algorithm logic
rather than boilerplate code) is to maintain a global copy of variables (in
the global environment) which makes them visible to all functions (where
appropriate, of course). Once the development and testing is finished, one
can tidy things up and modify the function prototypes, add lines for
unpacking lists inside functions, etc.

--
View this message in context: 
http://r.789695.n4.nabble.com/Best-practices-for-writing-R-libraries-tp3686674p3688850.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Start-up messages when Importing from a package

2011-07-23 Thread Mauricio Zambrano-Bigiarini

Dear List,

I'm building a package  that uses 2 functions of the 'sp' package, and I 
declared them in my NAMESPACE file as follow:



importFrom("sp", proj4string, coordinates)


The package is built without any problem, but when I load the package, I 
get the following message:


"
Loading required package: sp

Note: polygon geometry computations in maptools
depend on the package gpclib, which has a
restricted licence. It is disabled by default;
to enable gpclib, type gpclibPermit()

Checking rgeos availability as gpclib substitute:
TRUE
"


However, if I only load the 'sp' package (in a different R session), I 
don't get any warning message.



Is there any way I can prevent the warning message appears when I load 
my package ?



Thanks in advance for any help,


Mauricio Zambrano-Bigiairni
--
===
FLOODS Action
Land Management and Natural Hazards Unit
Institute for Environment and Sustainability (IES)
European Commission, Joint Research Centre (JRC)
webinfo: http://floods.jrc.ec.europa.eu/
===
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:11}}

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] default par

2011-07-23 Thread Berry Boessenkool


Hello dear R-developers,

two questions on an otherwise magnificent program:

1)
Is there a way to set defaults for par differently than R offers normally?
I for example would like to have las default to 1. (or in the same style, 
sometimes type in plot() could be "l" per default).

Tthe following post desribes pretty much exactly that:
https://stat.ethz.ch/pipermail/r-help/2007-March/126646.html
It was written four years ago, but it seems like there has been no real elegant 
solution.
Did I just miss something there? If so, could someone give me an update?
If not, is there a chance that such a feature  would be added to future 
R-versions?
I could live with the idea to assign the par$element default in Rprofile.site.

2)
Would it appear sensible to have R give a warning, when points() is used, and 
some/all values are out of plotting range in the active device?
It has happened some times that I needed quite a bit of time to figure out why 
nothing was plotted.
Such a warning (or maybe even a beep?) would give users the clue to look at the 
values right away...
(What I mean is this:    plot(1:10)  ; points(11,3)    just in case it's 
unclear)


Thanks ahead for pondering, and again: R ist the most beautiful thing I 
discovered in the last three years.
Keep up the good work!

Berry

-
Berry Boessenkool
University of Potsdam, Germany
-
  
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem with creating default NAMESPACE on FreeBSD

2011-07-23 Thread Rainer Hurling

On 22.07.2011 14:50 (UTC+1), Prof Brian Ripley wrote:

One possibility is that you are building from a tarball snapshot without
mentioning it, and the (unspecified) tarball is incomplete.

For R-devel using tarballs is not a wise idea: they are really only
checked carefully in pre-release periods. (One of the checks is that
AFAIR CRAN builds from the tarballs, but CRAN is not manned at present.)

But as far as I can the 'make dist' procedure does work now and did at
some point in the last week.

On Fri, 22 Jul 2011, Prof Brian Ripley wrote:


It does not seem to happen to anyone else, including me on FreeBSD. Is
this a completely clean install? src/library/datasets/Makefile
definitely installs a NAMESPACE file as part of the mkR1 target, so I
would check that you have a src/library/datasets/NAMESPACE file in
your sources.

(There was a short window on the 16th when it happened as a commit for
src/library/datasets/NAMESPACE was missed at first.)


Many thanks for answering and sorry for the late reaction. We had some 
trouble in business yesterday.


It was not a totally clean installation before. I only deinstalled the 
old R version before installing the new one in the same place (make 
deinstall / make reinstall with a selfmade port math/R-devel for testing 
purposes). Other packages etc. had not been deleted before.


I forgot to mention that there were warnings in the build for several 
packages, like that:


installing to /usr/ports/math/R-devel/work/R-devel/library/mgcv/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
During startup - Warning message:
package 'datasets' in options("defaultPackages") was not found

BUT:
Today I tried again with newest version r56478 and surprisingly, all 
that problems disappeared. Even no more warnings at build time.


For sureness I checked again older versions (between 15.07. and 21.07) 
but the build warnings there exist, with version r56478 they went away.


Rainer Hurling


P.S.: Thanks for the hint with the problems of the tarball. I had not 
been aware of it. In this case here it (mostly) also works with the 
tarball version.





On Fri, 22 Jul 2011, Rainer Hurling wrote:


After building and installing R-devel from 21/07/2011 on FreeBSD
9.0-CURRENT (amd64), starting R gives the following warning:

[..snip..]
Beim Start - Warnmeldung:
package 'datasets' in options("defaultPackages") was not found

This happens with all versions after 14/07/2011. I think it is
related to

NEWS Sat, 16 Jul 2011
CHANGES IN R-devel PACKAGE INSTALLATION
Packages without explicit ‘NAMESPACE’ files will have a default one
created at build or INSTALL time, so all packages will have
namespaces. A consequence of this is that ‘.First.lib’ functions need
to be renamed, usually as ‘.onLoad’ but sometimes as ‘.onAttach’.


Package 'datasets' seems to be installed correctly under
/usr/local/lib/R/library/:

ls -l datasets/
total 18
-rw-r--r-- 1 root wheel - 289 22 Jul 08:12:04 2011 DESCRIPTION
-rw-r--r-- 1 root wheel - 5547 22 Jul 08:12:04 2011 INDEX
drwxr-xr-x 2 root wheel - 512 22 Jul 08:12:04 2011 Meta
drwxr-xr-x 2 root wheel - 512 22 Jul 08:12:04 2011 R
drwxr-xr-x 2 root wheel - 512 22 Jul 08:12:04 2011 data
drwxr-xr-x 2 root wheel - 512 22 Jul 08:12:04 2011 help
drwxr-xr-x 2 root wheel - 512 22 Jul 08:12:04 2011 html


Calling options("defaultPackages") shows all relevant packages:

$defaultPackages
[1] "datasets" "utils" "grDevices" "graphics" "stats" "methods"


But trying to load library 'datasets' fails with the following message:

library(datasets)
Fehler in library(datasets) :
package 'datasets' does not have a NAMESPACE and should be re-installed


Googling around for some days now it looks like this does not happen
to anyone else (at least there are no infos). Does anybody knows what
is going on here?

Any help would be appreciated,
Rainer Hurling



sessionInfo()
R Under development (unstable) (2011-07-21 r56467)
Platform: amd64-portbld-freebsd9.0 (64-bit)

locale:
[1]
de_DE.ISO8859-15/de_DE.ISO8859-15/de_DE.ISO8859-15/C/de_DE.ISO8859-15/de_DE.ISO8859-15


attached base packages:
[1] stats graphics grDevices utils methods base


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel