[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


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

2011-07-25 Thread Mauricio Zambrano-Bigiarini

Prof Brian Ripley wrote:

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


Thank you very much prof. Ripley for pointing out my error.



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 




I'll try.

All the best,

Mauricio


--
===
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 the writer
and may not in any circumstances be regarded as stating
an official position of the European Commission."
===
Linux user #454569 -- Ubuntu user #17469
===
"There is only one pretty child in the world,
and every mother has it."
(Chinese Proverb)


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





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


[Rd] ' --enable-R-shlib' problem when setting up R-devel in Linux Mint 17.1 64-bit

2015-07-21 Thread MAURICIO ZAMBRANO BIGIARINI
x27;
make[4]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/extra/tre'
make[4]: `libtre.a' is up to date.
make[4]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/extra/tre'
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/extra/tre'
make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/extra'
make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/appl'
make[3]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/appl'
make[3]: `libappl.a' is up to date.
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/appl'
make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/appl'
make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/nmath'
make[3]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/nmath'
make[3]: `libnmath.a' is up to date.
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/nmath'
make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/nmath'
make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
make[3]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
make[3]: `libunix.a' is up to date.
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
make[3]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
ccache gcc -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H   -fopenmp -fpic  -ggdb -pipe
-std=gnu99 -Wall -pedantic  -L/usr/local/lib
-DR_HOME='"/home/hzambran/SVN/R-devel/trunk"' \
 -o Rscript ./Rscript.c
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/unix'
make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/main'
make[3]: Entering directory `/home/hzambran/SVN/R-devel/trunk/src/main'
ccache gcc -shared -fopenmp -L/usr/local/lib  -o libR.so
CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o
arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o
colors.o complex.o connections.o context.o cum.o dcf.o datetime.o
debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o
edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o
gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o
iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o
match.o memory.o names.o objects.o options.o paste.o platform.o plot.o
plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o
qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o
scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o
subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o
util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o
xxxpr.o   `ls ../unix/*.o ../appl/*.o ../nmath/*.o`
../extra/tre/libtre.a-lblas -lgfortran -lm -lquadmath   -lreadline
 -lpcre -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n
/usr/bin/ld: ../appl/dchdc.o: relocation R_X86_64_32 against `.rodata'
can not be used when making a shared object; recompile with -fPIC
../appl/dchdc.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [libR.so] Error 1
make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src'
make: *** [R] Error 1
*** Done -- now run 'make install'


I would highly appreciate any advice on how to solve this issue or how
to correctly set up r-devel.


Thanks in advance,

Mauricio Zambrano-Bigiarini, PhD

=
Dept. of Civil Engineering
Faculty of Engineering and Sciences
Universidad de La Frontera
PO Box 54-D, Temuco, Chile
=
mailto : mauricio.zambr...@ufrontera.cl
work-phone : +56 45 259 2812
http://ingenieriacivil.ufro.cl/
=
"When the pupil is ready, the master arrives."
(Zen proverb)
=
Linux user #454569 -- Linux Mint user

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


Re: [Rd] ' --enable-R-shlib' problem when setting up R-devel in Linux Mint 17.1 64-bit

2015-07-21 Thread MAURICIO ZAMBRANO BIGIARINI
Regarding the previous problem with setting up r-devel in Linux Mint
17.1 64-bit, I deleted all the r-devel files I previously had, and
then I did the check out to the

'~/svn/r-devel'

directory originally mentioned by by Dirk  on
https://stat.ethz.ch/pipermail/r-sig-debian/2012-August/001935.html,
instead of the customised location I previously chose:

'~/SVN/R-devel/trunk'

and now I everything worked perfectly fine.

However, I'm still wondering what should I change in the first script
proposed by Dirk on
https://stat.ethz.ch/pipermail/r-sig-debian/2012-August/001935.html if
i want to use a user-defined location for the development files (e.g.,
'~/SVN/R-devel/trunk'). I meant, in addition to the line:

cd ~/svn/r-devel



Kind regards,

Mauricio

=
"When the pupil is ready, the master arrives."
(Zen proverb)
=
Linux user #454569 -- Linux Mint user


On 21 July 2015 at 00:21, MAURICIO ZAMBRANO BIGIARINI
 wrote:
> Dear list,
>
> This is my first time trying to set up the development version of R
> (R-devel ) in my local machine to test some packages before submitting
> them to CRAN. I'm using Linux Mint 17.1 64-bit, which is an
> Ubuntu-based distro.
>
> However, I'm not able to correctly set up r-devel, apparently due to a
> problem with enabling the shared library support.
>
>
> I run the first script given by Dirk Eddelbuettel (changing
> '~/SVN/R-devel/trunk' by '~/svn/r-devel' as my local copy of r-devel)
> on:
> https://stat.ethz.ch/pipermail/r-sig-debian/2012-August/001935.html
>
>
> After running that script, the error message I get is:
>
>  `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a
> -lblas -lgfortran -lm -lquadmath   -lreadline  -lpcre -llzma -lbz2 -lz
> -lrt -ldl -lm -licuuc -licui18n
> /usr/bin/ld: ../appl/dchdc.o: relocation R_X86_64_32 against `.rodata'
> can not be used when making a shared object; recompile with -fPIC
> ../appl/dchdc.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[3]: *** [libR.so] Error 1
> make[3]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/main'
> make[2]: *** [R] Error 2
> make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src/main'
> make[1]: *** [R] Error 1
> make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/src'
> make: *** [R] Error 1
> *** Done -- now run 'make install'
>
>
> and the complete output of the make part of that script is below:
>
> R is now configured for x86_64-unknown-linux-gnu
>
>   Source directory:  .
>   Installation directory:/usr/local/lib/R-devel
>
>   C compiler:ccache gcc  -ggdb -pipe -std=gnu99 -Wall 
> -pedantic
>   Fortran 77 compiler:   ccache gfortran  -g -O2
>
>   C++ compiler:  ccache g++  -ggdb -pipe -Wall -pedantic
>   C++11 compiler:ccache g++  -std=c++11 -ggdb -pipe -Wall 
> -pedantic
>   Fortran 90/95 compiler:ccache gfortran -g -O2
>   Obj-C compiler:
>
>   Interfaces supported:  X11, tcltk
>   External libraries:readline, BLAS(generic), LAPACK(generic), curl
>   Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo, ICU
>   Options enabled:   shared R library, R profiling
>
>   Capabilities skipped:
>   Options not enabled:   shared BLAS, memory profiling
>
>   Recommended packages:  no
>
> make[1]: Entering directory `/home/hzambran/SVN/R-devel/trunk/doc/manual'
> make[1]: Nothing to be done for `front-matter'.
> make[1]: Nothing to be done for `html-non-svn'.
> make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/doc/manual'
> SVN-REVISION is unchanged
> make[1]: Entering directory `/home/hzambran/SVN/R-devel/trunk/m4'
> make[1]: Nothing to be done for `R'.
> make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/m4'
> make[1]: Entering directory `/home/hzambran/SVN/R-devel/trunk/tools'
> make[1]: Nothing to be done for `R'.
> make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/tools'
> make[1]: Entering directory `/home/hzambran/SVN/R-devel/trunk/doc'
> make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/doc/html'
> make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/doc/html'
> make[2]: Entering directory `/home/hzambran/SVN/R-devel/trunk/doc/manual'
> make[2]: Nothing to be done for `R'.
> make[2]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/doc/manual'
> make[1]: Leaving directory `/home/hzambran/SVN/R-devel/trunk/doc'
> make[1]: Entering directory `/home/hzambran/SVN/R-devel/trunk/etc'

Re: [Rd] ' --enable-R-shlib' problem when setting up R-devel in Linux Mint 17.1 64-bit

2015-07-21 Thread MAURICIO ZAMBRANO BIGIARINI
Thank you very much Dirk, Peter and Johannes for all your help.

Now, I removed all the previous files and repeated all the previous
procedure using my own SVN directory, instead of the
' ~/svn/r-devel' included in the original mail of Dirk, and everything
worked fine as well.

So I can confirm that very likely I suffered the effect of the
_initial_ configure, because I didn't run 'make clean' or 'make
distclean' in the first repo I checkout.

Finally, I slightly modified the first script of  Dirk  on
https://stat.ethz.ch/pipermail/r-sig-debian/2012-August/001935.html,
to avoid building in the source directory (following the advice of
Peter Dalgaard) and finally I'm able to set up R-devel on a daily
basis !

Thanks to all of you and I hope this thread might be useful for
somebody else

Kind regards,

Mauricio Zambrano-Bigiarini, PhD

=
Dept. of Civil Engineering
Faculty of Engineering and Sciences
Universidad de La Frontera
PO Box 54-D, Temuco, Chile
=
mailto : mauricio.zambr...@ufrontera.cl
work-phone : +56 45 259 2812
http://ingenieriacivil.ufro.cl/
=
"When the pupil is ready, the master arrives."
(Zen proverb)
=
Linux user #454569 -- Linux Mint user


On 21 July 2015 at 09:16, peter dalgaard  wrote:
>
>> On 21 Jul 2015, at 13:13 , Dirk Eddelbuettel  wrote:
>>
>>
>> You somehow boxed yourself into a corner, out of which you now seem to have
>> escaped, which is good.  The proper sequence (svn checkout ...; configure
>> ...; make ...) will work no matter what name you give the directory you work
>> in.
>>
>
> You may want to avoid building in the source directory, though. We don't 
> generally do that when testing, so you may bump into something unexpected.
>
> I.e., rather do
>
> export REPOS=https://svn.r-project.org/R
> export RTOP=~ #adjust as necessary
> cd $RTOP
> svn co $REPOS/trunk r-devel/R
> mkdir r-devel/BUILD
> #---
> cd r-devel/R
> svn up
> cd ../BUILD
> ../R/configure
> make
>
> For configure optione, I generally maintain a config.site in the r-devel 
> directory and copy it to BUILD before running configure.
>
> Presumably, regular R already exists as a package on Linux Mint. You might 
> want to investigate how R is built from sources, see for instance: 
> http://community.linuxmint.com/tutorial/view/1822
>
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>

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


Re: [Rd] parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command

2014-08-22 Thread Mauricio Zambrano-Bigiarini



On 22/08/14 16:03, Marius Hofert wrote:

Hi,

Both under the current R-devel (r66456) and a version from about 3
months ago, I experience the following behavior:


parallel::detectCores(TRUE)

Error in system(cmd, TRUE) : error in running command

traceback()

3: system(cmd, TRUE)
2: gsub("^ +", "", system(cmd, TRUE)[1])
1: parallel::detectCores(TRUE)




This is on Ubuntu 14.04. Does anybody else see this? [I currently have
quite a heavy workload, otherwise I would have installed and tested it
also under 3.1.1]


I also get the same error:

Error in system(cmd, TRUE) : error in running command


R 3.1.1 on Linux Mint 17 (based on Ubuntu 14.04)

sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_GB.UTF-8LC_COLLATE=en_GB.UTF-8
 [5] LC_MONETARY=en_GB.UTF-8LC_MESSAGES=en_GB.UTF-8
 [7] LC_PAPER=en_GB.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] raster_2.2-31 sp_1.0-15

loaded via a namespace (and not attached):
[1] grid_3.1.1  lattice_0.20-29 tools_3.1.1

Cheers,

Mauricio

--
===
Assistant Professor,
Faculty of Environmental Sciences and EULA-Chile Centre
University of Concepcion, Concepcion, Chile
===
"The only things in life you regret, are
the risks that you didn't take" (Anonymous)
===
Linux user #454569 -- Linux Mint user
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] requesting a new SIG mailing list

2012-02-13 Thread Mauricio Zambrano-Bigiarini

Dear R developers,

Due to the increasing use R in hydrology and other close-related 
environmental sciences, I would like to ask if it would be possible to 
create a new Special Interest Group mailing list, called 'R-sig-hydro', 
specially devoted those topics. If possible to do so, I'd offer myself 
to maintain such mailing list (if needed).



Thanks in advance,

Mauricio Zambrano-Bigiarini

--
===
FLOODS Action
Water Resources Unit (H01)
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:10}}

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


Re: [Rd] requesting a new SIG mailing list

2012-02-14 Thread Mauricio Zambrano-Bigiarini

On 14/02/12 09:36, Rainer M Krug wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 13/02/12 17:30, Mauricio Zambrano-Bigiarini wrote:

Dear R developers,

Due to the increasing use R in hydrology and other close-related
environmental sciences, I would like to ask if it would be possible
to create a new Special Interest Group mailing list, called
'R-sig-hydro', specially devoted those topics. If possible to do
so, I'd offer myself to maintain such mailing list (if needed).


I think it would be more useful to use the R-sig-geo for that, as
hydrology (please correct me if I am wrong - I am not an expert in
hydrology) is mainly spatial.

A fragmentation of the lists would need to duplicate effort by members.


I don't want to duplicate efforts, but I'm not sure about R-sig-geo as 
the right mailing list for hydrology and close-related environmental 
sciences.


It is true that hydrology has much to do with spatial analysis 
(interpolation techniques, use of satellite images as input for 
hydrological models, mapping, etc), but it has also a strong link to 
time series analysis (trend detection, stationary and non-stationary 
water quantity and quality modelling, climate change modelling, and a 
long etc), and probably the latter topics would be considered off-topic 
in the R-sig-geo


Another possibility could be to use the R-sig-ecology, which seems to be 
more related to hydrology:


"analytical techniques and topics that are appropriate for discussion on 
R-sig-ecology are quite broad. For examples of what might be appropriate 
for discussion on this list, please see the Environmentrics Task View 
(http://cran.r-project.org/web/views/Environmetrics.html)"

(taken from: https://stat.ethz.ch/mailman/listinfo/r-sig-ecology)

However, I did a quick search on the archives of 'R-sig-ecology' for the 
year 2011, and I could only found one single mail related to hydrology:


https://stat.ethz.ch/pipermail/r-sig-ecology/2011-July/002274.html

(in the same search I couldn't find any single reference to hydrology in 
the R-sig-geo during the year 2011)


I think the lack of posts related to hydrological sciences in dedicated 
R-sig-xxx mailing lists is not due to a lack of interest (in the same 
period I got several questions regarding the hydroTSM and hydroGOF 
packages), but they may be due to the fact that r-sig-geo or 
r-sig-ecology are not very intuitive for hydrologists


So, if you think that creating a new mailing list only for hydrology and 
related sciences could lead to fragmentation of the community and a 
duplication of efforts, we could start using the 'R-sig-ecology' mailing 
list.


Cheers,


Mauricio Zambrano-Bigiarini

--
===
FLOODS Action
Water Resources Unit (H01)
Institute for Environment and Sustainability (IES)
European Commission, Joint Research Centre (JRC)
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), Italy
webinfo: http://floods.jrc.ec.europa.eu/
===
DISCLAIMER:
"The views expressed are purely those of the writer
and may not in any circumstances be regarded as stating
an official position of the European Commission."
===
Linux user #454569 -- Ubuntu user #17469
===
"The greatest inspiration is often born of desperation."
(Comer Cotrell)





Cheers,

Rainer





Thanks in advance,

Mauricio Zambrano-Bigiarini




- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk86HRQACgkQoYgNqgF2egp1pwCfXrUJEBhQ8+50iwv7iYEZXa1C
7l4Anj9EmGCL3QE61VGZ/bw+/3r8n5b4
=bVRp
-END PGP SIGNATURE-



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


Re: [Rd] requesting a new SIG mailing list

2012-02-14 Thread Mauricio Zambrano-Bigiarini

On 14/02/12 17:45, Prof Brian Ripley wrote:

Have you asked the maintainers of those lists? Or the person who would
have to do the work to set the list up (Martin Maechler, who is
currently on vacation, or colleagues at ETHZ)?


No, I haven't done yet, but I'll do it, to know which list is the right 
one for hydrology.




My suspicion is that there would be too little traffic to make a
separate list worthwhile to administer. (You might feel so too: list
administrators end up dealing with a lot of nuisance traffic.)


Probably you are right, and it is worth to wait until the traffic in 
some of those lists be enough to justify a different mailing list.


Thank you very much for your feedback prof. Ripley.


All the best,

Mauricio Zambrano-Bigiarini

--
===
FLOODS Action
Water Resources Unit (H01)
Institute for Environment and Sustainability (IES)
European Commission, Joint Research Centre (JRC)
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), Italy
webinfo: http://floods.jrc.ec.europa.eu/
===
DISCLAIMER:
"The views expressed are purely those of the writer
and may not in any circumstances be regarded as stating
an official position of the European Commission."
===
Linux user #454569 -- Ubuntu user #17469
===



On 14/02/2012 16:31, Mauricio Zambrano-Bigiarini wrote:

On 14/02/12 09:36, Rainer M Krug wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 13/02/12 17:30, Mauricio Zambrano-Bigiarini wrote:

Dear R developers,

Due to the increasing use R in hydrology and other close-related
environmental sciences, I would like to ask if it would be possible
to create a new Special Interest Group mailing list, called
'R-sig-hydro', specially devoted those topics. If possible to do
so, I'd offer myself to maintain such mailing list (if needed).


I think it would be more useful to use the R-sig-geo for that, as
hydrology (please correct me if I am wrong - I am not an expert in
hydrology) is mainly spatial.

A fragmentation of the lists would need to duplicate effort by members.


I don't want to duplicate efforts, but I'm not sure about R-sig-geo as
the right mailing list for hydrology and close-related environmental
sciences.

It is true that hydrology has much to do with spatial analysis
(interpolation techniques, use of satellite images as input for
hydrological models, mapping, etc), but it has also a strong link to
time series analysis (trend detection, stationary and non-stationary
water quantity and quality modelling, climate change modelling, and a
long etc), and probably the latter topics would be considered off-topic
in the R-sig-geo

Another possibility could be to use the R-sig-ecology, which seems to be
more related to hydrology:

"analytical techniques and topics that are appropriate for discussion on
R-sig-ecology are quite broad. For examples of what might be appropriate
for discussion on this list, please see the Environmentrics Task View
(http://cran.r-project.org/web/views/Environmetrics.html)"
(taken from: https://stat.ethz.ch/mailman/listinfo/r-sig-ecology)

However, I did a quick search on the archives of 'R-sig-ecology' for the
year 2011, and I could only found one single mail related to hydrology:

https://stat.ethz.ch/pipermail/r-sig-ecology/2011-July/002274.html

(in the same search I couldn't find any single reference to hydrology in
the R-sig-geo during the year 2011)

I think the lack of posts related to hydrological sciences in dedicated
R-sig-xxx mailing lists is not due to a lack of interest (in the same
period I got several questions regarding the hydroTSM and hydroGOF
packages), but they may be due to the fact that r-sig-geo or
r-sig-ecology are not very intuitive for hydrologists

So, if you think that creating a new mailing list only for hydrology and
related sciences could lead to fragmentation of the community and a
duplication of efforts, we could start using the 'R-sig-ecology' mailing
list.

Cheers,


Mauricio Zambrano-Bigiarini






"The greatest inspiration is often born of desperation."
(Comer Cotrell)

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


Re: [Rd] requesting a new SIG mailing list

2012-02-15 Thread Mauricio Zambrano-Bigiarini

On 15/02/12 09:07, Dominik Reusser wrote:

Dear all,
I do think that joining efforts is a good idea. However, hydrologists will
probably not intuitively think about joining r-sig-ecology to discuss
hydrological issues. Could we therefore explicitely state on the infopage that
discussions to hydrology (in addition to general  environmental data) are also
welcome.


It would be great if Sara of someone of the maintainers of the 
r-sig-ecology list could add that info to the info page.


I don't think it is worth it, but probably the appropriate name would then be
r-sig-env for such a list? In the description, you are also refering to the
Environmetrics task list.


I think that r-sig-env would be much more intuitive for environmental 
scientists coming from fields different from ecology, but I don't think 
it is possible to change the name of an existing mailing list.


However, I'm wondering if it would be possible to create an alias termed 
'r-sig-env' to 'r-sig-ecology' ?, in order to make the name of the list 
more intuitive for environmental scientists but without disturbing the 
current users.




I'm wondering where we can make people aware of the fact, that hydrological
issues are discussed on r-sig-ecology. I'm going to ask Gavin Simpson to put
references to the list on the environmetrics task view if you agree that this
would be useful.


I think it would be very useful to make more general the description of 
the r-sig-ecology in the R mailing list page 
(http://www.r-project.org/mail.html), something like:


R-sig-ecology: Using R in environmental and ecological data analysis


Also, we can announce the mailing list during our R-short

course on hydrology at EGU. What else?


This would be great !



Best regards!
Dominik



All the best,

Mauricio Zambrano-Bigiarini

--
===
FLOODS Action
Water Resources Unit (H01)
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:10}}

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


Re: [Rd] requesting a new SIG mailing list

2012-02-16 Thread Mauricio Zambrano-Bigiarini

On 16/02/12 12:51, Sarah Goslee wrote:

Dear Martin,

Thank you for confirming what I'd already suspected
about the mailing list software.


What a pity that is not possible, but thank you very much Martin for 
confirming and explaining why is not possible.




I've added hydrology explicitly to the list description, and
hope that the hydrologists find it a welcoming home. We've
got a solid core of participants, so R users should
find it a useful resource.



It is decided then.
Thank you very much Sarah for adding hydrology to the description of the 
R-sig-ecology mailing list:


"The purpose of R-sig-ecology is two-fold. First, we want to provide a 
discussion forum for those analyzing ecological and environmental data 
with R, including but not limited to vegetation, soils and hydrology. 
Second, we want to encourage R users of all ability and experience to 
participate so that we may grow the community of ecologists and 
environmental scientists that use R."



Thank you all for taking part in this discussion. I'll start spreading 
the voice among colleagues.


I hope Dominik may mention this mailing list in the EGU 2012 short 
course "Hydrological Analysis in R":

http://meetingorganizer.copernicus.org/EGU2012/session/10635


All the best for the enhanced R-sig-ecology mailing list.

Mauricio Zambrano-Bigiarini

--
===
FLOODS Action
Water Resources Unit (H01)
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 the writer
and may not in any circumstances be regarded as stating
an official position of the European Commission."
===
Linux user #454569 -- Ubuntu user #17469
===
"The greatest inspiration is often born of desperation."
(Comer Cotrell)


Sarah

On Thu, Feb 16, 2012 at 6:39 AM, Martin Maechler
  wrote:

Hi,

I'm the "site maintainer" of the r-sig-...@r-project.org mailing
lists (and back from vacations).


Sarah Goslee
 on Wed, 15 Feb 2012 12:16:01 -0500 writes:


>  Hi all,
>>  It would be great if Sara of someone of the maintainers
>>  of the r-sig-ecology list could add that info to the info page.

>  I'm talking with the other maintainer about revising both
>  the short and the long descriptions.

>>  I think that r-sig-env would be much more intuitive for
>>  environmental scientists coming from fields different
>>  from ecology, but I don't think it is possible to change
>>  the name of an existing mailing list.

yes, that would be only doable with much effort,
and (unless even more effort is put in) it would invalidate all
current links to the current archives etc.

>>  However, I'm wondering if it would be possible to create
>>  an alias termed 'r-sig-env' to 'r-sig-ecology' ?, in
>>  order to make the name of the list more intuitive for
>>  environmental scientists but without disturbing the
>>  current users.

>  I don't know that there is any mechanism for doing either
>  of those things.  Changing the name would be disruptive,
>  and I don't know of an alias option.

there is none, on the mailing list level.
On the mail server side, I could create such aliases,
but then these would only apply to e-mail addresses and the ML
software would still "speak" of the official ML name...

Given all the issues and opinions heard so far, I'd also
propose trying to have hydrologists and other env.scientists
join the r-sig-ecology for the time being.

Brian Ripley has already mentioned the very important point,
that there's some often non-negligible admin overhead for each
list, and I can add that indeed, we have had several lists that
always remained too small and so never "started flying".






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


[Rd] --as-cran error

2012-05-02 Thread Mauricio Zambrano-Bigiarini

Dear List,

While using the --as-cran option for checking one of my packages:

R CMD check --as-cran hydroGOF_0.3-3.tar.gz


I got the following error message:

pkgname <- "hydroGOF"
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
> library('hydroGOF')
Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) :
  there is no package called ‘class’

However, I don't get any error message when the checking is done without 
the --as-cran option.


Could somebody give me a hint about how to solve this error before 
submission to CRAN ?



sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=CLC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

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


Thanks in advance,

Mauricio Zambrano-Bigiarini
--

Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
webinfo: http://floods.jrc.ec.europa.eu/

DISCLAIMER:
"The views expressed are purely those of the writer
and may not in any circumstances be regarded as sta-
ting an official position of the European Commission"

Linux user #454569 -- Ubuntu user #17469

"A strong man and a waterfall always
channel their own path." (Unknown)

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


[Rd] Dependency problem for "hasArg"

2012-07-02 Thread Mauricio Zambrano-Bigiarini

Dear list,

I'm running an R script which first line is:

#!/usr/bin/Rscript

While running that script from the system console (in Red Hat 
Enterprise Linux 6) I got the following error:



Error in plot2(x = sim, y = obs, plot.type = "single", main = 
paste("Daily",  :

  could not find function "hasArg"
Calls: plot_results -> plot_out -> ggof -> plot2


However, if I call EXACTLY the same script from the R console, by using

> source("myRscript.R")

I do not get any error.


As you can see in the error message, the function 'plot_results' calls 
'plot_out' (both in the hydroPSO package). Then 'plot_out' calls the 
function 'ggof', which in turn calls 'plot2' (the latter 2 in the 
hydroGOF package), and 'plot2' has a call to 'hasArg'.



The package 'hydroGOF' exports all its functions by using:

exportPattern("^[^\\.]")

At the other hand, the package 'hydroPSO' does not import any function 
of the 'hydroGOF' package, because the call to 'ggof' only occurs within 
the 'plot_out' function if the hydroGOF package is detected on the user 
machine:


if (!require(hydroGOF)) {
 stop("Invalid argument: You don't have the 'hydroGOF' package !!")
} else {
  library(hydroGOF)
  ggof()
}

Do I have to explicitly import 'ggof' and 'plot2' on the 'hydroPSO' 
package in order to avoid this error or is there any better solution ?


sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=CLC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

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

other attached packages:
[1] lhs_0.7  hydroPSO_0.1-57  hydroGOF_0.3-3-1 hydroTSM_0.3-4-5
[5] xts_0.8-6Lisflood_0.2-10  zoo_1.7-7

loaded via a namespace (and not attached):
 [1] automap_1.0-12 class_7.3-4    cluster_1.14.2 e1071_1.6 
grid_2.15.0   [6] gstat_1.0-12   Hmisc_3.9-3lattice_0.20-6 
proj4_1.0-7rgdal_0.7-12  [11] sp_0.9-99  tools_2.15.0




Any help would be very much appreciated.

Kind regards,

Mauricio Zambrano-Bigiarini

--

Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
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


Re: [Rd] Dependency problem for "hasArg"

2012-07-03 Thread Mauricio Zambrano-Bigiarini

On 02/07/12 22:51, Martin Morgan wrote:

On 07/02/2012 06:23 PM, Charlie Friedemann wrote:

The error message you are getting makes it rather clear what the
problem is.
R is unable to find the function 'hasArg'. As the hasArg function is part
of the package 'methods', a solution would be to put require(methods)
at the
beginning of your script.


But I think the idea will be to import(methods) in HydroGOF, since the
package requires these imports to function properly, and import'ing will
mean that hasArg does not have to be found on the (user-controlled)
search path.


Thank you very much for your help.

I have already tried import(methods) in the NAMESPACE of hydroGOF, 
however, I got the following error message when doing R CMD check:


 checking package dependencies ... ERROR
Namespace dependency not required: ‘methods’

So it seems that is not possible to force a package to import 'methods'.


Regarding the Dirk's comment, could it be possible to revisit the 
decision about  loading 'methods' in in Rscript ?. BTW, I do not know 
who is responsible for Rscript...



Thanks in advance,

Mauricio
--

Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
webinfo: http://floods.jrc.ec.europa.eu/

DISCLAIMER:
"The views expressed are purely those of the writer
and may not in any circumstances be regarded as sta-
ting an official position of the European Commission"

Linux user #454569 -- Ubuntu user #17469

"The only things in life you regret,
Are the risks that you didn't take"
(Anonymous)



Martin



For whatever reason, loading R via Rscript does not load the base package
"methods" whereas loading the R console does. I'm not entirely sure
why this
is the case, and I'm sure someone who knows more about the differences
between the two could chime in here.

--
View this message in context:
http://r.789695.n4.nabble.com/Dependency-problem-for-hasArg-tp4635147p4635158.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





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


Re: [Rd] Dependency problem for "hasArg"

2012-07-03 Thread Mauricio Zambrano-Bigiarini

On 03/07/12 09:10, Martin Morgan wrote:

On 07/03/2012 09:07 AM, Mauricio Zambrano-Bigiarini wrote:

On 02/07/12 22:51, Martin Morgan wrote:

On 07/02/2012 06:23 PM, Charlie Friedemann wrote:

The error message you are getting makes it rather clear what the
problem is.
R is unable to find the function 'hasArg'. As the hasArg function is
part
of the package 'methods', a solution would be to put require(methods)
at the
beginning of your script.


But I think the idea will be to import(methods) in HydroGOF, since the
package requires these imports to function properly, and import'ing will
mean that hasArg does not have to be found on the (user-controlled)
search path.


Thank you very much for your help.

I have already tried import(methods) in the NAMESPACE of hydroGOF,
however, I got the following error message when doing R CMD check:

checking package dependencies ... ERROR
Namespace dependency not required: ‘methods’

So it seems that is not possible to force a package to import 'methods'.


In your DESCRIPTION file, add

Imports: methods

Martin


Thank you very much Martin.

Now hydroGOF with import(methods) pass R CMD check without any problem.

All the best,

Mauricio




Regarding the Dirk's comment, could it be possible to revisit the
decision about loading 'methods' in in Rscript ?. BTW, I do not know who
is responsible for Rscript...


Thanks in advance,

Mauricio





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


[Rd] Correct use of Depends, Imports and ::

2012-11-07 Thread Mauricio Zambrano-Bigiarini

Dear R developers,

Taking advantage of the yesterday discussion about the use of 
Depends/Import/Suggests/Enhances, I would like to add a related question.


Let's assume, in the DESCRIPTION file of my package foo0, I have:

Depends: foo1
Imports: foo2

while in the NAMESPACE file of my package I have

importFrom("foo2", f2)


and within my package I use the following two external functions:

f1, from package foo1
f2, from package foo2


If I want to use the two previous functions within a function of my 
package foo0, is it correct to call them as follow ( assuming 'x' is the 
only argument of 'f1' and 'f2'):


f1(x)
foo2::f2(x)

OR should I use

foo1::f1(x)
f2(x)

OR

f1(x)
f2(x)

OR

something else (the correct way of doing it in R) ?



Finally, can I use the following call in the body of a function of my 
package foo0:


foo3::f3(x)

without declaring the package 'foo3' in the Imports section of my 
DESCRIPTION file ?



Thanks in advance for your help,


Mauricio Zambrano-Bigiarini

--
=
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT
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


Re: [Rd] Correct use of Depends, Imports and ::

2012-11-07 Thread Mauricio Zambrano-Bigiarini
2012/11/7 Prof Brian Ripley :
> On 07/11/2012 17:52, mauricio zambrano wrote:
>>
>>
>>
>> On 11/07/12, Simon Urbanek   wrote:
>>
>>> On Nov 7, 2012, at 9:25 AM, Simon Urbanek wrote:
>>>
>>>> On Nov 7, 2012, at 4:04 AM, Mauricio Zambrano-Bigiarini wrote:
>>>>
>>>>> Dear R developers,
>>>>>
>>>>> Taking advantage of the yesterday discussion about the use of
>>>>> Depends/Import/Suggests/Enhances, I would like to add a related
>>>>> question.
>>>>>
>>>>> Let's assume, in the DESCRIPTION file of my package foo0, I
>>>>> have:
>>>>>
>>>>> Depends: foo1 Imports: foo2
>>>>>
>>>>> while in the NAMESPACE file of my package I have
>>>>>
>>>>> importFrom("foo2", f2)
>>>>>
>>>>>
>>>>> and within my package I use the following two external
>>>>> functions:
>>>>>
>>>>> f1, from package foo1 f2, from package foo2
>>>>>
>>>>>
>>>>> If I want to use the two previous functions within a function
>>>>> of my package foo0, is it correct to call them as follow (
>>>>> assuming 'x' is the only argument of 'f1' and 'f2'):
>>>>>
>>>>> f1(x) foo2::f2(x)
>>>>>
>>>>> OR should I use
>>>>>
>>>>> foo1::f1(x) f2(x)
>>>>>
>>>>> OR
>>>>>
>>>>> f1(x) f2(x)
>>>>>
>>>>
>>>> Yes, this one. You have imported f2 so the whole point of that is
>>>> that it will be inserted as "f2" into your imports environment,
>>>> so you want to use it that way. When you use foo2:: you are
>>>> skipping over imports and addressing the namespace of foo2
>>>> directly which sort of defeats the purpose (and is slower).
>>
>>
>> Thanks Simon for making the point related to f2 clearer for me.
>>
>>>>
>>>> As for f1, you have attached the package so it is available. I
>>>> would not use foo1:: for the same reason as above, but there is a
>>>> risk that it may get clobbered since the call will go through the
>>>> search path so you may not get f1 from foo1 necessarily - this
>>>> may or may not be a good thing depending on your intentions. You
>>>> could import it via import(foo1) to make sure you don't need to
>>>> go through the search path - that's what I would do if I don't
>>>> intend overrides. (Whether you want to use Depends or Imports in
>>>> that case is related to what you intend for the user to see as I
>>>> was saying in my last comment - if I expect users to use foo1 as
>>>> well, I would use Depends, otherwise Imports is good enough.)
>
>
> Or declare in Depends but also import in the NAMESPACE.
>
>
>> So, if I'm only using a few functions of foo1, I shouldn't declare
>> them in Depends, but only in Imports, which also will allow me to be
>> sure that the functions come from foo1 and not from another package
>> that have functions with the same, right ?
>
>
> Yes, but it would be better to use importsFrom() with just the functions you
> need (the list of exported functions from foo1 could change over time).

That is what I wanted to say (although I was not explicit):
to declare the dependency of package foo1 in the Imports section of
the DESCRIPTION file, and then import the specific functions in the
NAMESPACE file by using importFrom("foo1", f11,...,f1n)

Thank you very much for this useful advise.


Mauricio Zambrano-Bigiarini
--
=
Water Resources Unit
Institute for Environment and Sustainability
Joint Research Centre, European Commission
webinfo: http://floods.jrc.ec.europa.eu/
=
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:15}}

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


Re: [Rd] Correct use of Depends, Imports and ::

2012-11-07 Thread Mauricio Zambrano-Bigiarini
2012/11/7 Stephanie M. Gogarten :
>
>
> On 11/7/12 12:00 PM, Prof Brian Ripley wrote:
>>
>> On 07/11/2012 17:52, mauricio zambrano wrote:
>>>
>>>
>>>
>>> On 11/07/12, Simon Urbanek   wrote:
>>>
>>>> On Nov 7, 2012, at 9:25 AM, Simon Urbanek wrote:
>>>>
>>>>> On Nov 7, 2012, at 4:04 AM, Mauricio Zambrano-Bigiarini wrote:
>>>>>
>>>>>> Dear R developers,
>>>>>>
>>>>>> Taking advantage of the yesterday discussion about the use of
>>>>>> Depends/Import/Suggests/Enhances, I would like to add a related
>>>>>> question.
>>>>>>
>>>>>> Let's assume, in the DESCRIPTION file of my package foo0, I
>>>>>> have:
>>>>>>
>>>>>> Depends: foo1 Imports: foo2
>>>>>>
>>>>>> while in the NAMESPACE file of my package I have
>>>>>>
>>>>>> importFrom("foo2", f2)
>>>>>>
>>>>>>
>>>>>> and within my package I use the following two external
>>>>>> functions:
>>>>>>
>>>>>> f1, from package foo1 f2, from package foo2
>>>>>>
>>>>>>
>>>>>> If I want to use the two previous functions within a function
>>>>>> of my package foo0, is it correct to call them as follow (
>>>>>> assuming 'x' is the only argument of 'f1' and 'f2'):
>>>>>>
>>>>>> f1(x) foo2::f2(x)
>>>>>>
>>>>>> OR should I use
>>>>>>
>>>>>> foo1::f1(x) f2(x)
>>>>>>
>>>>>> OR
>>>>>>
>>>>>> f1(x) f2(x)
>>>>>>
>>>>>
>>>>> Yes, this one. You have imported f2 so the whole point of that is
>>>>> that it will be inserted as "f2" into your imports environment,
>>>>> so you want to use it that way. When you use foo2:: you are
>>>>> skipping over imports and addressing the namespace of foo2
>>>>> directly which sort of defeats the purpose (and is slower).
>>>
>>>
>>> Thanks Simon for making the point related to f2 clearer for me.
>>>
>>>>>
>>>>> As for f1, you have attached the package so it is available. I
>>>>> would not use foo1:: for the same reason as above, but there is a
>>>>> risk that it may get clobbered since the call will go through the
>>>>> search path so you may not get f1 from foo1 necessarily - this
>>>>> may or may not be a good thing depending on your intentions. You
>>>>> could import it via import(foo1) to make sure you don't need to
>>>>> go through the search path - that's what I would do if I don't
>>>>> intend overrides. (Whether you want to use Depends or Imports in
>>>>> that case is related to what you intend for the user to see as I
>>>>> was saying in my last comment - if I expect users to use foo1 as
>>>>> well, I would use Depends, otherwise Imports is good enough.)
>>
>>
>> Or declare in Depends but also import in the NAMESPACE.
>
>
> This is especially a good idea if there is any chance that anyone else will
> ever want to import your package.  If a package is in Depends but the
> functions you use are not explicitly imported in the NAMESPACE (with imports
> or importsFrom), it can cause problems as described in this thread:
>
> https://stat.ethz.ch/pipermail/r-devel/2011-September/062043.html

So, no matter if the package providing the functions I'm using within
my package (e.g., foo1) are declared in the Depends or Imports section
of the DESCRIPTION file, it is always a "good practice" to specify all
the imported functions with import(foo1) or importFrom("foo1",
f11,...,f1n) in the NAMESPACE file of my package, in order to avoid
problems as the one described in the previous link.

Thanks Prof. Ripley and Stephanie for the advice,

All the best,

Mauricio
--
=
Water Resources Unit
Institute for Environment and Sustainability
Joint Research Centre, European Commission
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] BibTeX entries in CITATION file

2012-11-22 Thread Mauricio Zambrano-Bigiarini

Dear List,

While trying to define a customised CITATION file for a package, 
following R-exts, I realised that if I use only one 'citEntry' I got 
both a text description and a BibTex entry for the package, as for the 
'nlme' package:


--
citation('nlme')

To cite package 'nlme' in publications use:

  Jose Pinheiro, Douglas Bates, Saikat DebRoy, Deepayan Sarkar and the
  R Development Core Team (2012). nlme: Linear and Nonlinear Mixed
  Effects Models. R package version 3.1-105.

A BibTeX entry for LaTeX users is

  @Manual{,
title = {nlme: Linear and Nonlinear Mixed Effects Models},
author = {Jose Pinheiro and Douglas Bates and Saikat DebRoy and 
Deepayan Sarkar and {R Core Team}},

year = {2012},
note = {R package version 3.1-105},
  }

---


BUT, if I use two or more 'citEntry' in the CITATION file (e.g., for the 
manual and a book), the bibTeX entries are NOT shown any more, and only 
the text description for the two or more entries are shown, as for the 
'boot' package:


---
citation('boot')

To cite the 'boot' package in publications use:

  Angelo Canty and Brian Ripley (2012). boot: Bootstrap R (S-Plus)
  Functions. R package version 1.3-7.

  Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their
  Applications. Cambridge University Press, Cambridge. ISBN
  0-521-57391-2
---

Is there any way to show the two bib entries for cases similar to the 
'boot' package ?



sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=CLC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

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



Thanks in advance,

Mauricio Zambrano-Bigiarini

--
=
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT
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


Re: [Rd] BibTeX entries in CITATION file

2012-11-22 Thread Mauricio Zambrano-Bigiarini

On 22/11/12 17:36, Duncan Murdoch wrote:

On 22/11/2012 11:28 AM, Mauricio Zambrano-Bigiarini wrote:

Dear List,

While trying to define a customised CITATION file for a package,
following R-exts, I realised that if I use only one 'citEntry' I got
both a text description and a BibTex entry for the package, as for the
'nlme' package:

--
citation('nlme')

To cite package 'nlme' in publications use:

Jose Pinheiro, Douglas Bates, Saikat DebRoy, Deepayan Sarkar and the
R Development Core Team (2012). nlme: Linear and Nonlinear Mixed
Effects Models. R package version 3.1-105.

A BibTeX entry for LaTeX users is

@Manual{,
title = {nlme: Linear and Nonlinear Mixed Effects Models},
author = {Jose Pinheiro and Douglas Bates and Saikat DebRoy and
Deepayan Sarkar and {R Core Team}},
year = {2012},
note = {R package version 3.1-105},
}

---


BUT, if I use two or more 'citEntry' in the CITATION file (e.g., for the
manual and a book), the bibTeX entries are NOT shown any more, and only
the text description for the two or more entries are shown, as for the
'boot' package:

---
citation('boot')

To cite the 'boot' package in publications use:

Angelo Canty and Brian Ripley (2012). boot: Bootstrap R (S-Plus)
Functions. R package version 1.3-7.

Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their
Applications. Cambridge University Press, Cambridge. ISBN
0-521-57391-2
---

Is there any way to show the two bib entries for cases similar to the
'boot' package ?


toBibtex(citation("boot"))

should do it.




Thank you very much Achim and Duncan.

However, I was not clear enough. My question is if there is any way in 
which I should modify the CITATION file of my package in order to show 
the two or more bib entries automatically. For example, when you type:


citation("boot")

my expected output is something like:


To cite the 'boot' package in publications use:

 Angelo Canty and Brian Ripley (2012). boot: Bootstrap R (S-Plus)
 Functions. R package version 1.3-7.

 Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their
 Applications. Cambridge University Press, Cambridge. ISBN
 0-521-57391-2

 BibTeX entries for for LaTeX users are:






Is there any way in which I can achieve this ?


Mauricio
--
=
Linux user #454569 -- Ubuntu user #17469
=
"It is a mistake to look too far ahead. Only one
link in the chain of destiny can be handled at a time"
(Sir Winston Churchill)

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


Re: [Rd] BibTeX entries in CITATION file

2012-11-23 Thread Mauricio Zambrano-Bigiarini

On 22/11/12 18:23, Achim Zeileis wrote:

On Thu, 22 Nov 2012, Mauricio Zambrano-Bigiarini wrote:


On 22/11/12 17:36, Duncan Murdoch wrote:

On 22/11/2012 11:28 AM, Mauricio Zambrano-Bigiarini wrote:

Dear List,

While trying to define a customised CITATION file for a package,
following R-exts, I realised that if I use only one 'citEntry' I got
both a text description and a BibTex entry for the package, as for the
'nlme' package:

--
citation('nlme')

To cite package 'nlme' in publications use:

Jose Pinheiro, Douglas Bates, Saikat DebRoy, Deepayan Sarkar and the
R Development Core Team (2012). nlme: Linear and Nonlinear Mixed
Effects Models. R package version 3.1-105.

A BibTeX entry for LaTeX users is

@Manual{,
title = {nlme: Linear and Nonlinear Mixed Effects Models},
author = {Jose Pinheiro and Douglas Bates and Saikat DebRoy and
Deepayan Sarkar and {R Core Team}},
year = {2012},
note = {R package version 3.1-105},
}

---


BUT, if I use two or more 'citEntry' in the CITATION file (e.g., for
the
manual and a book), the bibTeX entries are NOT shown any more, and only
the text description for the two or more entries are shown, as for the
'boot' package:

---
citation('boot')

To cite the 'boot' package in publications use:

Angelo Canty and Brian Ripley (2012). boot: Bootstrap R (S-Plus)
Functions. R package version 1.3-7.

Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their
Applications. Cambridge University Press, Cambridge. ISBN
0-521-57391-2
---

Is there any way to show the two bib entries for cases similar to the
'boot' package ?


toBibtex(citation("boot"))

should do it.




Thank you very much Achim and Duncan.

However, I was not clear enough. My question is if there is any way in
which I should modify the CITATION file of my package in order to show
the two or more bib entries automatically. For example, when you type:

citation("boot")

my expected output is something like:


To cite the 'boot' package in publications use:

Angelo Canty and Brian Ripley (2012). boot: Bootstrap R (S-Plus)
Functions. R package version 1.3-7.

Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their
Applications. Cambridge University Press, Cambridge. ISBN
0-521-57391-2

BibTeX entries for for LaTeX users are:






Is there any way in which I can achieve this ?


No, this is currently not possible. format.bibentry() always omits the
BibTeX if there are 2 or more entries (in style = "citation").

The CRAN web page for the package always displays all BibTeX entries
though: http://CRAN.R-project.org/web/packages/boot/citation.html



Thanks !

All the best,

Mauricio


Mauricio
--
=
Linux user #454569 -- Ubuntu user #17469
=
"It is a mistake to look too far ahead. Only one
link in the chain of destiny can be handled at a time"
(Sir Winston Churchill)

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





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


Re: [Rd] Comments in the DESCRIPTION file

2012-12-06 Thread Mauricio Zambrano-Bigiarini

On 07/11/12 11:01, Prof Brian Ripley wrote:

On 07/11/12 09:53, Duncan Murdoch wrote:

On 12-11-07 4:26 AM, Christophe Genolini wrote:

Hi all,

Is it possible to add comments in the DESCRIPTION file?



The read.dcf function is used to read the DESCRIPTION file, and it
doesn't support comments. (The current Debian control format
description does appear to support comments with leading # markers, but
R's read.dcf function doesn't support these.)

You could probably get away with something like

#: this is a comment

since unrecognized fields are ignored, but I think this fact is
undocumented so I would say it's safer to assume that comments are not
supported.


In that form, but lots of people have fields like

Note: this is a comment

and CRAN uses

X-CRAN-Comment:


Dear Prof. Ripley,

Last week I used the 'X-CRAN-Comment' field in the DESCRIPTION file of a 
package that now is on CRAN. However, the comment I added is not shown 
on the web page of the package on CRAN 
(http://cran.r-project.org/web/packages/hydroPSO).


Does it mean that the 'X-CRAN-Comment' field is not actually used by 
CRAN or it is used but not shown on the CRAN web page of the package ?


Thanks in advance,

Mauricio Zambrano-Bigiarini

--
=
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT
webinfo: http://floods.jrc.ec.europa.eu/
=
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:14}}

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


Re: [Rd] Comments in the DESCRIPTION file

2012-12-06 Thread Mauricio Zambrano-Bigiarini

On 06/12/12 19:14, Uwe Ligges wrote:



On 06.12.2012 18:22, Mauricio Zambrano-Bigiarini wrote:

On 07/11/12 11:01, Prof Brian Ripley wrote:

On 07/11/12 09:53, Duncan Murdoch wrote:

On 12-11-07 4:26 AM, Christophe Genolini wrote:

Hi all,

Is it possible to add comments in the DESCRIPTION file?



The read.dcf function is used to read the DESCRIPTION file, and it
doesn't support comments. (The current Debian control format
description does appear to support comments with leading # markers, but
R's read.dcf function doesn't support these.)

You could probably get away with something like

#: this is a comment

since unrecognized fields are ignored, but I think this fact is
undocumented so I would say it's safer to assume that comments are not
supported.


In that form, but lots of people have fields like

Note: this is a comment

and CRAN uses

X-CRAN-Comment:


Dear Prof. Ripley,

Last week I used the 'X-CRAN-Comment' field in the DESCRIPTION file of a
package that now is on CRAN. However, the comment I added is not shown
on the web page of the package on CRAN
(http://cran.r-project.org/web/packages/hydroPSO).



Err, please do not use it yourself.
This is intended for CRAN internal purposes only, hence we call it
X-CRAN- so we are assuming nobody else uses it.


Thanks Uwe for making this point clear.

All the best,

Mauricio



Thanks,
Uwe Ligges


Does it mean that the 'X-CRAN-Comment' field is not actually used by
CRAN or it is used but not shown on the CRAN web page of the package ?

Thanks in advance,

Mauricio Zambrano-Bigiarini





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


[Rd] limitations to random number generator in 64-bits machines

2013-02-21 Thread Mauricio Zambrano-Bigiarini

Dear List,

Recently I got the comment that the implementation of the random number 
generator used by default in R (Mersenne-Twister) could not be "safe" 
for 64-bits machines, so I decided to put the question here because I do 
not have expertise in that topic, and because this question could be 
"too technical for R-help's audience". I apologise if this is not the case.


The period 2^19937 - 1 mentioned in the help page of 'RNG' for the 
Mersenne-Twister generator, is it the same for 32-bits machines and 
64-bits ones ?


In addition:

-) If I want to generate two consecutive sequences s_1 and s_2 of n 
pseudo-random numbers each, and knowing how the Random number generator 
is coded, can we estimate in advance the correlation coefficient rho 
between s1 and s2?


-) Let us say that we compute the correlation coefficient rho between 
s_1 and s_2 and find it is not null. How small should it be so that we 
can reasonably use  a statistical analysis that does suppose that the 
sequences are independent ?



Thank in advance for any help you can provide,

Mauricio Zambrano-Bigiarini

--
=
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT
webinfo: http://floods.jrc.ec.europa.eu/
=
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:10}}

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


Re: [Rd] limitations to random number generator in 64-bits machines

2013-02-22 Thread Mauricio Zambrano-Bigiarini

On 22/02/13 12:54, Prof Brian Ripley wrote:

On 22/02/2013 11:02, Bert Gunter wrote:

AFAICS, these are statistics, not R, issues, and are completely off
topic here. You should post on a statistics list, such as
stats.stackexchange.com, instead.


Except for the unattributed vague comment about 64-bit (sic) machines.
The RNG is the same (and gives the same results) on both 32- and 64-bit
machines.  The size of the pointer has nothing to do with random-number
generation.


Thank you very much for making this clear for me.

Kind regards,

Mauricio

--
=
Linux user #454569 -- Ubuntu user #17469
=
"Where ambition ends happiness begins"
(Source Unknown)

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


[Rd] Licence change

2013-05-03 Thread Mauricio Zambrano-Bigiarini

Dear list,

For the maintainer of a given package, is it possible to change the 
licence of a it from GPL >= 2 to GPL >= 3 ?


Thanks in advance,

Mauricio Zambrano-Bigiarini, Ph.D

--
=
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
TP 261, Via Enrico Fermi 2749, 21027 Ispra (VA), IT
webinfo: http://floods.jrc.ec.europa.eu/
=
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:9}}

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


Re: [Rd] Licence change

2013-05-03 Thread Mauricio Zambrano-Bigiarini


On 03/05/13 16:56, Simon Urbanek wrote:


On May 3, 2013, at 10:34 AM, Mauricio Zambrano-Bigiarini wrote:


Dear list,

For the maintainer of a given package, is it possible to change the licence of a it 
from GPL >= 2 to GPL >= 3 ?



In general the maintainer has no such rights. However, if the maintainer is 
also the author and holds all copyright, he can release the package under any 
license he feels fit. What has been already released cannot be affected, 
obviously, but you can release a new version under a different license if you 
have the legal right to do so.


Thank you very much Duncan and Simon for your replies.

The package I'm asking about has 1 author [aut] (me) and 1 contributor 
[ctb] in the 'Author' field of the DESCRIPTION file. Both of them hold 
the copyright of the package.


In case we want to change the licence. Do the 2 authors write something 
particular in the next submission to CRAN ?

Do we need to provide some written document to CRAN ?


What Duncan means with
"If you are distributing the package on CRAN, you'll have to ask them 
whether they'll still choose to distribute your package after the change"


May CRAN to decide not to distribute the package because of the change 
in the licence ?





(This is not related to the possibility, but one practical problem with requiring 
GPL >=3 is that it is not GPL-2 compatible so it's a decision that better be 
made very consciously with all the consequences in mind).


If the package we are talking about is pure R code, with only some 
dependencies to other R packages, what are the implications of:


" one practical problem with requiring GPL >=3 is that it is not GPL-2 
compatible"



Thanks again,

Mauricio

--
=
Linux user #454569 -- Ubuntu user #17469
=
"Study, Practice and Teach" (Jim Rohn)

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