[Rd] Formulas in gam function of mgcv package

2009-08-24 Thread Corrado
Dear R-experts,

I have a question on the formulas used in the gam function of the mgcv 
package.

I am trying to understand the relationships between:

y~s(x1)+s(x2)+s(x3)+s(x4)

and 

y~s(x1,x2,x3,x4)

Does the latter contain the former? what about the smoothers of all 
interaction terms? 

I have (tried to) read the manual pages of gam, formula.gam, smooth.terms, 
linear.functional.terms but could not understand properly.

Regards
-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

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


[Rd] --enable-memory-profiling at configuration (compilation) time?

2009-09-03 Thread Corrado
Dear Rfriends,

what is the option --enable-memory-profiling at configuration (just before 
build 
+ install) time?

I did not find mention of it in the R admin manual (http://cran.r-
project.org/doc/manuals/R-admin.html).

Regards
-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

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


Re: [Rd] Windows Laptop specification query

2009-09-28 Thread Corrado
(Intel
> >> T9900-6M Cache, 3.06 GHz) dual core CPU.
> >> I'm wondering if there is value in ordering the quad core. We are
> >> looking at a time frame of 3-4 years.
> >>
> >> Is anyone aware of near future plans to implement some form or
> >> parallelization that would more or less be hidden from the normal user?
> >>
> >> It is anticipated that analysis of Next Gen sequence data will be
> >> important.
> >>
> >> I've read the Windows FAQ about running R under Vista. We will probably
> >> start with Vista. I've read some posts in R-devel indicating people are
> >> running R under Windows 7. Is it safe to assume that R will run under
> >> Windows 7 after it is released?
> >>
> >> We are hoping to make use the 8GB of memory. Am I right in assuming that
> >> when the 64 bit version of Windows 7 is available, it will allow R users
> >> to make good use of the 8GB of memory. Does this happen under the
> >> current higher end versions of 64 bit Vista?
> >>
> >> cheers,
> >>
> >> Keith
> >>
> >> 
> >> Keith Satterley
> >> Bioinformatics Division
> >> The Walter and Eliza Hall Institute of Medical Research
> >> Parkville, Melbourne,
> >> Victoria, Australia
> >>
> >> __
> >> R-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

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


Re: [Rd] Windows Laptop specification query

2009-09-28 Thread Corrado
On Monday 28 September 2009 11:01:42 Prof Brian Ripley wrote:
> The answer to (1) is in the rw-FAQ, so see

Can you point me out exactly where? Since I did not find it.

-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

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


[Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-10-31 Thread Corrado
lib64/libreadline.so.5.2
2ad38add8000-2ad38add9000 rw-p 2ad38add8000 00:00 0
2ad38add9000-2ad38ae23000 r-xp  08:02 
2044157/lib64/libncurses.so.5.6
2ad38ae23000-2ad38b022000 ---p 0004a000 08:02 
2044157/lib64/libncurses.so.5.6
2ad38b022000-2ad38b027000 rw-p 00049000 08:02 
2044157/lib64/libncurses.so.5.6
2ad38b027000-2ad38b04d000 r-xp  08:02 
2044050/lib64/libpcre.so.0.0.1
2ad38b04d000-2ad38b24c000 ---p 00026000 08:02 
2044050/lib64/libpcre.so.0.0.1
2ad38b24c000-2ad38b24d000 rw-p 00025000 08:02 
2044050/lib64/libpcre.so.0.0.1
2ad38b24d000-2ad38b24e000 rw-p 2ad38b24d000 00:00 0
2ad38b24e000-2ad38b262000 r-xp  08:02 
2044118/lib64/libz.so.1.2.3
2ad38b262000-2ad38b461000 ---p 00014000 08:02 
2044118/lib64/libz.so.1.2.3
2ad38b461000-2ad38b462000 rw-p 00013000 08:02 
2044118/lib64/libz.so.1.2.3
2ad38b462000-2ad38b464000 r-xp  08:02 
2044015/lib64/libdl-2.7.so
2ad38b464000-2ad38b664000 ---p 2000 08:02 
2044015/lib64/libdl-2.7.so
2ad38b664000-2ad38b665000 r--p 2000 08:02 
2044015/lib64/libdl-2.7.so
2ad38b665000-2ad38b666000 rw-p 3000 08:02 
2044015/lib64/libdl-2.7.so
2ad38b666000-2ad38b668000 rw-p 2ad38b666000 00:00 0
2ad38b668000-2ad38b6a7000 r--p  08:02 
720800 /usr/share/locale/UTF-8/LC_CTYPE
2ad38b6a7000-2ad38b78b000 r--p  08:02 
720801 /usr/share/locale/UTF-8/LC_COLLATE
2ad38b78b000-2ad38b78c000 r--p  08:02 
892249 /usr/share/locale/en_GB.UTF-8/LC_TIME
2ad38b78c000-2ad38b78d000 r--p  08:02 
892496 /usr/share/locale/en_GB.UTF-8/LC_PAPER
2ad38b78d000-2ad38b78e000 r--p  08:02 
892500 /usr/share/locale/en_GB.UTF-8/LC_MAborted
[EMAIL PROTECTED]:~$ 

OS: Mandriva 2008.1 x86_64
Postgresql: 8.3.1 (PostGIS enabled)
R: from 2.6.2 from repository to 2.8.0 repackaged

Is it my doing, or R's doing?

Best,

-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

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


Re: [Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-10-31 Thread Corrado
I apologise  The dsn is not empty, the database the dsn connects to is 
empty!

You get the same error when connecting to a populated database.

Regards 


On Friday 31 October 2008 12:26:39 Peter Dalgaard wrote:
> Corrado wrote:
> > Dear friends,
> >
> > there is a serious problem with RODBC on R from 2.6.2 to 2.8.0 on a
> > postgresql 8.3 database.
> >
> > Let's say we define an empty dsn called "test", with user "postgres" and
> > password "none". We test the connection with another application, and it
> > works properly.
> >
> > When you call the database using RODBC, you get the following:
> >> odbcConnect("test","postgres","none")
> >
> > *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated
> > === Backtrace: =
> > /lib64/libc.so.6(__fortify_fail+0x37)[0x2ad38a3f4157]
> > /lib64/libc.so.6[0x2ad38a3f27e0]
> > /lib64/libc.so.6[0x2ad38a3f1db9]
> > /lib64/libc.so.6(_IO_default_xsputn+0x8e)[0x2ad38a379b5e]
> > /lib64/libc.so.6(_IO_vfprintf+0x3c22)[0x2ad38a351fa2]
> > /lib64/libc.so.6(__vsprintf_chk+0x9d)[0x2ad38a3f1e5d]
> > /lib64/libc.so.6(__sprintf_chk+0x80)[0x2ad38a3f1da0]
> > /usr/lib64/libodbcpsql.so.2(SQLGetInfo+0x973)[0x2ad38de11013]
> > /usr/lib64/libodbc.so.1(SQLGetInfo+0x624)[0x2ad38c5e91a4]
> > /usr/lib64/R/library/RODBC/libs/RODBC.so(RODBCGetInfo+0xbb)[0x2ad38c393a9
> >b]
>
> --
>
> > OS: Mandriva 2008.1 x86_64
> > Postgresql: 8.3.1 (PostGIS enabled)
> > R: from 2.6.2 from repository to 2.8.0 repackaged
> >
> > Is it my doing, or R's doing?
>
> (R-help snipped)
>
> It looks like that the problem is in the RODBC package, so the
> maintainer of RODBC should be informed. For reproducibility, you might
> need to be more explicit about how to create an "empty dsn" with postgres.



-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

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


Re: [Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-10-31 Thread Corrado
Dear friends,

the problem is on a postgresql 8.3.1 database on a 64 platform (the setting 
described at the bottom of the previous email).

If the problems is with the odbc driver, why do the other applications connect 
through odbc to the same databases without any problem? I do not think it is 
possible 

I have been able to connect easily to postgresql databases using previous 
versions of RODBC (that is, before 1.2.3).

Could it be a problem with the compilation flags (CFLAGS)?

As for the steps: as user postgres create a database called test, create a 
dsn, launch R, call the library RODBC, use odbcConnect => buffer overflow. I 
thought they were already described in the original email.

Here is the odbc.ini for the dsn:

[test]
Description = PostgreSQL
Driver  = PostgreSQL
Trace= Yes
TraceFile   = /tmp/sql.log
Database= test
Servername  = localhost
Username= postgres
Password= none
Port= 5432
ReadOnly= No
RowVersioning   = No
ShowSystemTables= No
ShowOidColumn   = No
FakeOidIndex= No
ConnSettings=


Best,
-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

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


Re: [Rd] *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-10-31 Thread Corrado
On Friday 31 October 2008 16:29:13 you wrote:
> See Prof. Ripley's message.  RODBC is passing a buffer and buffer size
> to the ODBC driver, and that driver is overflowing the buffer.  You
> could probably hide this bug by making the buffer larger, but the real
> fix is for the driver to take account of the buffer size it is being given.

1) How do you make the buffer bigger? Are we talking about increasing the 
-- --param=ssp-buffer-size=4 at compilation time? would that solve the 
problem, in your opinion?

2) Why is this problem RODBC specific, if the problem is in the odbc driver? I 
do agree that RODBC passes buffer / buffer size, but why do other 
applications work and RODBC does not? If the problem was with the driver, 
then every other application linking to the same database through the same 
driver would have the same problem, unless the other applications pass the 
call (+ buffer / buffer size) in a different way. 

Please, keep in mind I am just trying to solve a problem that other people may 
have, because I am using standard installation. 

Best,
--
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

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


[Rd] Solved (RODBC): was Re: *** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated on R 2.6.2 to 2.8.0: logging a bug?

2008-11-07 Thread Corrado
Dear friends,

problem solved after talking to the unixODBC maintainer.

The problem is that the odbc driver (not unixODBC). The standard Mandriva 
installation uses the old default postgresql driver, which was embedded in 
the unixODBC, and not the newer odbc driver.

As long as you update the driver (by downloading, building and installing 
manually) to the appropriate version: 

Here is the most important link: http://psqlodbc.projects.postgresql.org/

Is it the case of putting note somewhere for other Mandriva users?

On Friday 31 October 2008 19:13:18 Duncan Murdoch wrote:
> On 10/31/2008 12:57 PM, Corrado wrote:
> > On Friday 31 October 2008 16:29:13 you wrote:
> >> See Prof. Ripley's message.  RODBC is passing a buffer and buffer size
> >> to the ODBC driver, and that driver is overflowing the buffer.  You
> >> could probably hide this bug by making the buffer larger, but the real
> >> fix is for the driver to take account of the buffer size it is being
> >> given.
> >
> > 1) How do you make the buffer bigger? Are we talking about increasing the
> > -- --param=ssp-buffer-size=4 at compilation time? would that solve the
> > problem, in your opinion?
>
> I don't know.  I wouldn't do that.
>
> > 2) Why is this problem RODBC specific, if the problem is in the odbc
> > driver?
>
> Because the other packages pass bigger buffers, or generate different
> messages?
>
> I
>
> > do agree that RODBC passes buffer / buffer size, but why do other
> > applications work and RODBC does not? If the problem was with the driver,
> > then every other application linking to the same database through the
> > same driver would have the same problem, unless the other applications
> > pass the call (+ buffer / buffer size) in a different way.
>
> Or if they ask the driver to do different things, or pass a different
> size of buffer, etc.  The fact that this only occurs for RODBC suggests
> there's a problem there, but the fact that the driver is using sprintf
> on a limited size of buffer is far stronger evidence that the problem is
> in the driver.
>
> Duncan Murdoch
>
> > Please, keep in mind I am just trying to solve a problem that other
> > people may have, because I am using standard installation.
> >
> > Best,
> > --
> > Corrado Topi
> >
> > Global Climate Change & Biodiversity Indicators
> > Area 18,Department of Biology
> > University of York, York, YO10 5YW, UK
> > Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

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


[Rd] Distance between clusters

2009-03-02 Thread Corrado
Dear friends

I reformulate the question. I think I did not formulate it properly.

I have some data on some sites. I can define a dissimilarity between each pair 
of sites. Using this dissimilarity, I have clustered the sites using the 
hclust algorithm, with method ward. I then obtain 48 clusters, by cutting the 
tree using cutree with k=48. 

I would now like to estimate the distance between each pair of the 48 
resulting clusters. I have read the documentation, but I cannot find a 
solution.

Any clue on how I can do that?

This is a snippet of the code:

distPredTurn<-as.dist(dissimilarityMatrix)
hctr<-hclust(distPredTurn,"ward")
cutree(hctr,k=48)


Regards
-- 
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk

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