[Rd] (no subject)

2005-09-19 Thread Antonio, Fabio Di Narzo
Is it planned to 'officially' support F95 code in R-2.2.0?
If not, by now, how is it possible to 'smothly' use F95 code in a
package (i mean, using gfortran)?
Something like stopping compilation if a non-f95 compiler is found. My
idea by now is to search for the gfortran executable, and set the F77
variable to this in the configure script...

Any suggestion will be appreciated!
Antonio, Fabio Di Narzo.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] using F95 code in package src (was: (no subject))

2005-09-19 Thread Antonio, Fabio Di Narzo
sorry: wrote 'subject' as 'attachments'!

On 9/19/05, Antonio, Fabio Di Narzo <[EMAIL PROTECTED]> wrote:
> Is it planned to 'officially' support F95 code in R-2.2.0?
> If not, by now, how is it possible to 'smothly' use F95 code in a
> package (i mean, using gfortran)?
> Something like stopping compilation if a non-f95 compiler is found. My
> idea by now is to search for the gfortran executable, and set the F77
> variable to this in the configure script...
> 
> Any suggestion will be appreciated!
> Antonio, Fabio Di Narzo.
> 
>

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


Re: [Rd] using F95 code in package src (was: (no subject))

2005-09-19 Thread Prof Brian Ripley
On Mon, 19 Sep 2005, Antonio, Fabio Di Narzo wrote:

> sorry: wrote 'subject' as 'attachments'!
>
> On 9/19/05, Antonio, Fabio Di Narzo <[EMAIL PROTECTED]> wrote:
>> Is it planned to 'officially' support F95 code in R-2.2.0?

Do you mean in a contributed package to be installed in R?  There are no 
plans to use F95 in R itself.

If so, perhaps by 2.3.0, but there are a lot of issues to resolve.  For 
example, how do you indicate that the source file is F95?  Some compilers 
accept a .f95 extension, but not all (and it is not ever clean which do).

>> If not, by now, how is it possible to 'smothly' use F95 code in a
>> package (i mean, using gfortran)?

It is not. The largest R platform, Windows, does not have a supported F95 
compiler.  (g95 works with MinGW, but R has no support for it as yet, nor 
can one expect people to have installed it.)

>> Something like stopping compilation if a non-f95 compiler is found. My
>> idea by now is to search for the gfortran executable, and set the F77
>> variable to this in the configure script...

Why do you think gfortran is a F95 compiler? (It has considerable support 
for F95, but not complete support AFAICS.)  And that it is the only F95 
compiler?   How do you propose to tell if you have a F95 compiler?


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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


[Rd] Contacting RDCOMClient Maintainer

2005-09-19 Thread Gabor Grothendieck
I tried to contact the maintainer of RDCOMClient as per the DESCRIPTION file 
to report a bug but my mail bounced.  Is there more recent contact information?

The original message was received at Mon, 19 Sep 2005 03:03:21 -0500 (CDT)
from hoemail2.lucent.com [192.11.226.163]

  - The following addresses had permanent fatal errors -
<[EMAIL PROTECTED]>
   (reason: 550 5.1.1 <[EMAIL PROTECTED]>... User unknown)

  - Transcript of session follows -
... while talking to grubby.research.bell-labs.com.:
>>> DATA
<<< 550 5.1.1 <[EMAIL PROTECTED]>... User unknown
550 5.1.1 <[EMAIL PROTECTED]>... User unknown
<<< 503 5.0.0 Need RCPT (recipient)


Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.1
Remote-MTA: DNS; grubby.research.bell-labs.com
Diagnostic-Code: SMTP; 550 5.1.1 <[EMAIL PROTECTED]>... User unknown
Last-Attempt-Date: Mon, 19 Sep 2005 03:03:22 -0500 (CDT)

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


Re: [Rd] Contacting RDCOMClient Maintainer

2005-09-19 Thread Kurt Hornik
> Gabor Grothendieck writes:

> I tried to contact the maintainer of RDCOMClient as per the
> DESCRIPTION file to report a bug but my mail bounced.  Is there more
> recent contact information?

Yes.  In case you want to have it .

  Duncan Temple Lang <[EMAIL PROTECTED]>

-k

> The original message was received at Mon, 19 Sep 2005 03:03:21 -0500 (CDT)
> from hoemail2.lucent.com [192.11.226.163]

>   - The following addresses had permanent fatal errors -
> <[EMAIL PROTECTED]>
>(reason: 550 5.1.1 <[EMAIL PROTECTED]>... User unknown)

>   - Transcript of session follows -
> ... while talking to grubby.research.bell-labs.com.:
 DATA
> <<< 550 5.1.1 <[EMAIL PROTECTED]>... User unknown
> 550 5.1.1 <[EMAIL PROTECTED]>... User unknown
> <<< 503 5.0.0 Need RCPT (recipient)


> Final-Recipient: RFC822; [EMAIL PROTECTED]
> Action: failed
> Status: 5.1.1
> Remote-MTA: DNS; grubby.research.bell-labs.com
> Diagnostic-Code: SMTP; 550 5.1.1 <[EMAIL PROTECTED]>... User unknown
> Last-Attempt-Date: Mon, 19 Sep 2005 03:03:22 -0500 (CDT)

> __
> 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] looks in liblapack.a not liblapack.so

2005-09-19 Thread Martyn Plummer
On Sat, 2005-09-17 at 17:19 -0500, Charles Geyer wrote:
> I can't compile R-alpha on AMD 64.  Rather than include a 1400 line script
> I have put it on the web
> 
> http://www.stat.umn.edu/~charlie/typescript.txt
> 
> way down near the bottom it fails building lapack.so
> 
> gcc -shared -L/usr/local/lib64 -o lapack.so  Lapack.lo-llapack -lblas 
> -lg2c -lm -lgcc_s
> 
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld:
>  
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../lib64/liblapack.a(dgecon.i):
>  relocation R_X86_64_32 against `a local symbol' can not be used when making 
> a shared object; recompile with -fPIC
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../lib64/liblapack.a: 
> could not read symbols: Bad value
> 
> The 'recompile with -fPIC' is bullsh*t.  The problem is that is is looking
> in /usr/lib64/liblapack.a rather than /usr/lib64/liblapack.so.3 both of which
> exist.  Some searching for this error message on Google shows a lot of
> questions about this problem but no solution that I found other than
> 
> rm /usr/lib64/liblapack.a
> 
> which I don't consider a solution.  It will link with the .so as the bottom
> of the script shows
> 
> snowbank$ cd src/modules/lapack
> snowbank$ gcc -shared -o lapack.so Lapack.lo -llapack -lblas -lg2c -lm 
> -lgcc_s
> 
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld:
>  
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../lib64/liblapack.a(dgecon.i):
>  relocation R_X86_64_32 against `a local symbol' can not be used when making 
> a shared object; recompile with -fPIC
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../lib64/liblapack.a: 
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> snowbank$ gcc -shared -o lapack.so Lapack.lo /usr/lib64/liblapack.so.3 
> -lblas -l g2c -lm -lgcc_s
> 
> No problems with the second link.
> 
> So what do I do?  liblapack.so is there.  I've linked other (non-R) programs
> to it.  So it SHOULD work with R.
> 
> Either I can't read (possible) or the solution to this isn't in the gcc info
> pages.
> 
> System (more info in typescript).
> 
>AMD 64
>SuSE linux 9.3
>GCC 3.3.5
> 
> I also observed the same problem with R-2.1.1 but didn't get around to
> debugging it until today.
> 
> It occurred to me that /usr/local/lib/liblapack.so.3 which is 32 bit
> (because right now we are running only one R on both 32 and 64 bit and
> that's where the 32 bit R finds it's shared libraries), but I don't
> think that's the problem.  Well maybe it is.  How do I tell configure
> NOT to add /user/local ?

You would need to modify the LDFLAGS and CPPFLAGS environment variables,
as these default to -L/usr/local/lib and -I/usr/local/include
respectively.  See Appendix B.3.3 of the R Installation and
Administration manual, which gives a warning about 64-bit systems.

You can also use the --with-readline configure flag to specify the exact
location of the readline library you wish to use.

I hope this helps.
Martyn


---
This message and its attachments are strictly confidential. ...{{dropped}}

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


[Rd] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Martin Maechler
I've changed the subject in the hope some more people would
voice an opinion...

> "MM" == Martin Maechler <[EMAIL PROTECTED]>
> on Sat, 17 Sep 2005 17:29:20 +0200 writes:

> "Wst" == Werner Stahel <[EMAIL PROTECTED]>
> on Fri, 16 Sep 2005 09:37:02 +0200 writes:


Wst> 
Wst> 
Wst> 

Wst> For most plots, I like to see a smoother along with the
Wst> points.  I suggest to add the option to include
Wst> smoothers, not only as an argument to plot.lm, but even
Wst> as an option().  I have heared of the intense
Wst> discussions about options().  With Martin, we arrived
Wst> at the conclusion that options() should never influence
Wst> calculations and results, but is suitable to adjust
Wst> outputs (numerical: digits=, graphical: smooth=) to the
Wst> user's taste.

MM> {and John Fox agreed, `in general'}

MM> That could be a possibility, for 2.2.0 only applied to
MM> plot.lm() in any case, where plot.lm() would get a new
MM> argument

MM> add.smooth = getOption("plot.add.smooth")

MM> What do people think about the name?  it would ``stick
MM> with us'' -- so we better choose it well..

No reaction so far 


I've realized that I can introduce this very easily into
plot.lm():

Instead of the former argument

 panel = points

I use the new ones

 panel = if(add.smooth) panel.smooth else points,

 add.smooth = isTRUE(getOption("plot.add.smooth")),

- - - 

Now I even propose to have
  
options(add.smooth = TRUE)

as a new default.

Do I get a reaction now?
Martin

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


Re: [Rd] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Duncan Murdoch
On 9/19/2005 8:18 AM, Martin Maechler wrote:
> I've changed the subject in the hope some more people would
> voice an opinion...
> 
>> "MM" == Martin Maechler <[EMAIL PROTECTED]>
>> on Sat, 17 Sep 2005 17:29:20 +0200 writes:
> 
>> "Wst" == Werner Stahel <[EMAIL PROTECTED]>
>> on Fri, 16 Sep 2005 09:37:02 +0200 writes:
> 
> 
> Wst> 
> Wst> 
> Wst> 
> 
> Wst> For most plots, I like to see a smoother along with the
> Wst> points.  I suggest to add the option to include
> Wst> smoothers, not only as an argument to plot.lm, but even
> Wst> as an option().  I have heared of the intense
> Wst> discussions about options().  With Martin, we arrived
> Wst> at the conclusion that options() should never influence
> Wst> calculations and results, but is suitable to adjust
> Wst> outputs (numerical: digits=, graphical: smooth=) to the
> Wst> user's taste.
> 
> MM> {and John Fox agreed, `in general'}
> 
> MM> That could be a possibility, for 2.2.0 only applied to
> MM> plot.lm() in any case, where plot.lm() would get a new
> MM> argument
> 
> MM> add.smooth = getOption("plot.add.smooth")
> 
> MM> What do people think about the name?  it would ``stick
> MM> with us'' -- so we better choose it well..
> 
> No reaction so far 
> 
> 
> I've realized that I can introduce this very easily into
> plot.lm():
> 
> Instead of the former argument
> 
>panel = points
> 
> I use the new ones
> 
>panel = if(add.smooth) panel.smooth else points,
> 
>  add.smooth = isTRUE(getOption("plot.add.smooth")),
> 
> - - - 
> 
> Now I even propose to have
>   
>   options(add.smooth = TRUE)
> 
> as a new default.
> 
> Do I get a reaction now?

I like the name "add.smooth" (as used at the bottom) better than 
"plot.add.smooth" (as used a few lines up).

With that choice, I think it's a good idea.

Duncan Murdoch

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


Re: [Rd] automatically adding smooth to plot:options("plot.add.smooth")

2005-09-19 Thread John Fox
Dear Duncan and Martin,


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Duncan Murdoch
> Sent: Monday, September 19, 2005 7:47 AM
> To: Martin Maechler
> Cc: Werner Stahel; R-devel@stat.math.ethz.ch
> Subject: Re: [Rd] automatically adding smooth to 
> plot:options("plot.add.smooth")
> 
> On 9/19/2005 8:18 AM, Martin Maechler wrote:
> > I've changed the subject in the hope some more people would 
> voice an 
> > opinion...
> > 
> >> "MM" == Martin Maechler <[EMAIL PROTECTED]>
> >> on Sat, 17 Sep 2005 17:29:20 +0200 writes:
> > 
> >> "Wst" == Werner Stahel <[EMAIL PROTECTED]>
> >> on Fri, 16 Sep 2005 09:37:02 +0200 writes:
> > 
> > 
> > Wst> 
> > Wst> 
> > Wst> 
> > 
> > Wst> For most plots, I like to see a smoother along with the
> > Wst> points.  I suggest to add the option to include
> > Wst> smoothers, not only as an argument to plot.lm, but even
> > Wst> as an option().  I have heared of the intense
> > Wst> discussions about options().  With Martin, we arrived
> > Wst> at the conclusion that options() should never influence
> > Wst> calculations and results, but is suitable to adjust
> > Wst> outputs (numerical: digits=, graphical: smooth=) to the
> > Wst> user's taste.
> > 
> > MM> {and John Fox agreed, `in general'}
> > 
> > MM> That could be a possibility, for 2.2.0 only applied to
> > MM> plot.lm() in any case, where plot.lm() would get a new
> > MM> argument
> > 
> > MM> add.smooth = getOption("plot.add.smooth")
> > 
> > MM> What do people think about the name?  it would ``stick
> > MM> with us'' -- so we better choose it well..
> > 
> > No reaction so far 
> > 
> > 
> > I've realized that I can introduce this very easily into
> > plot.lm():
> > 
> > Instead of the former argument
> > 
> >  panel = points
> > 
> > I use the new ones
> > 
> >  panel = if(add.smooth) panel.smooth else points,
> > 
> >  add.smooth = isTRUE(getOption("plot.add.smooth")),
> > 
> > - - -
> > 
> > Now I even propose to have
> >   
> > options(add.smooth = TRUE)
> > 
> > as a new default.
> > 
> > Do I get a reaction now?
> 
> I like the name "add.smooth" (as used at the bottom) better 
> than "plot.add.smooth" (as used a few lines up).
> 
> With that choice, I think it's a good idea.
> 
> Duncan Murdoch

I agree.

Regards,
 John

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


[Rd] Lists and data frames (PR#8143)

2005-09-19 Thread fwagner
Full_Name: Frank Wagner
Version: R 2.1.1
OS: Windows
Submission from: (NULL) (193.174.73.34)


Hi,
The pdf file R-intro descripe on page 27 that lists can be extended by adding
numbers.
Unfortunately, it's not working 
## example :

# if i did not declare the variable an error occurs : object not found
mylist <- list() 
mylist[1] <- list(value1=3, value2=5)
## Error

Can you please help me
Thank you

Regards
Frank Wagner

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


Re: [Rd] Lists and data frames (PR#8143)

2005-09-19 Thread Liaw, Andy
> From: r-devel
> 
> Full_Name: Frank Wagner
> Version: R 2.1.1
> OS: Windows
> Submission from: (NULL) (193.174.73.34)
> 
> 
> Hi,
> The pdf file R-intro descripe on page 27 that lists can be 
> extended by adding
> numbers.
> Unfortunately, it's not working 
> ## example :
> 
> # if i did not declare the variable an error occurs : object not found
> mylist <- list() 
> mylist[1] <- list(value1=3, value2=5)
> ## Error

I don't get that (with R-2.1.1-patched on WinXPPro):

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1 Patched (2005-07-13), ISBN 3-900051-07-0

[...]

> mylist <- list() 
> mylist[1] <- list(value1=3, value2=5)
Warning message:
number of items to replace is not a multiple of replacement length 


Andy 

 
> Can you please help me
> Thank you
> 
> Regards
> Frank Wagner
> 
> __
> 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] Lists and data frames (PR#8143)

2005-09-19 Thread ligges
[EMAIL PROTECTED] wrote:

> Full_Name: Frank Wagner
> Version: R 2.1.1
> OS: Windows
> Submission from: (NULL) (193.174.73.34)
> 
> 
> Hi,
> The pdf file R-intro descripe on page 27 that lists can be extended by adding
> numbers.
> Unfortunately, it's not working 
> ## example :
> 
> # if i did not declare the variable an error occurs : object not found
> mylist <- list() 
> mylist[1] <- list(value1=3, value2=5)
> ## Error

NO!

1. No, this is not a bug!
2. No, this was not an error but a *warning* which tells you that the 
length does not match.
Each Element of *vector* mylist must be a list of length one, hence you 
cannot assign one of length two. Instead you can say:

mylist[1:2] <- list(value1=3, value2=5)

This is a question that might go to R-help, if you do not understand 
what is described in the docs. The manual is correct, hence this is not 
a bug.
Please read the docs on how to post bugs and how a bug is defined ...

Uwe Ligges



> 
> Can you please help me
> Thank you
> 
> Regards
> Frank Wagner
> 
> __
> 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] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Paul Gilbert
Martin Maechler wrote:

> I've changed the subject in the hope some more people would
> voice an opinion...

...

> Now I even propose to have
>   
>   options(add.smooth = TRUE)
> 
> as a new default.
> 
> Do I get a reaction now?
> Martin

I think you may break a lot of things if you make this the default for 
plot. Plot gets used by other things (like matplot) where this default 
may not make much sense. (But I may have missed too much of the earlier 
discussion under some other subject.)

Paul
> 
> __
> 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] Lists and data frames (PR#8143)

2005-09-19 Thread Gavin Simpson
On Mon, 2005-09-19 at 15:34 +0200, [EMAIL PROTECTED] wrote:
> Full_Name: Frank Wagner
> Version: R 2.1.1
> OS: Windows
> Submission from: (NULL) (193.174.73.34)
> 
> 
> Hi,
> The pdf file R-intro descripe on page 27 that lists can be extended by adding
> numbers.
> Unfortunately, it's not working 
> ## example :
> 
> # if i did not declare the variable an error occurs : object not found
> mylist <- list() 
> mylist[1] <- list(value1=3, value2=5)
> ## Error

You need to use [[x]] to subset a list:

> mylist <- list()
> mylist[[1]] <- list(value1=3, value2=5)
> mylist
[[1]]
[[1]]$value1
[1] 3

[[1]]$value2
[1] 5

> str(mylist)
List of 1
 $ :List of 2
  ..$ value1: num 3
  ..$ value2: num 5

I don't know whether there is a typo on page 27 or not: [x] is valid, it
just means something different to [[x]] - as explained on page 26 of
said manual. If it was intentional, then IMHO it is not the most clear
example of extending a list - the [[x]] notation is what I would expect
to have to use - after reading page 26 of course...

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography   [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

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


Re: [Rd] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Duncan Murdoch
On 9/19/2005 10:01 AM, Paul Gilbert wrote:
> Martin Maechler wrote:
> 
>> I've changed the subject in the hope some more people would
>> voice an opinion...
> 
> ...
> 
>> Now I even propose to have
>>   
>>  options(add.smooth = TRUE)
>> 
>> as a new default.
>> 
>> Do I get a reaction now?
>> Martin
> 
> I think you may break a lot of things if you make this the default for 
> plot. Plot gets used by other things (like matplot) where this default 
> may not make much sense. (But I may have missed too much of the earlier 
> discussion under some other subject.)

This was going to affect only plot.lm, as far as I know.

Duncan Murdoch

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


Re: [Rd] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Martin Maechler
> "PaulG" == Paul Gilbert <[EMAIL PROTECTED]>
> on Mon, 19 Sep 2005 10:01:57 -0400 writes:

PaulG> Martin Maechler wrote:
>> I've changed the subject in the hope some more people
>> would voice an opinion...

PaulG> ...

>> Now I even propose to have
>> 
>> options(add.smooth = TRUE)
>> 
>> as a new default.
>> 
>> Do I get a reaction now?  Martin

PaulG> I think you may break a lot of things if you make
PaulG> this the default for plot. 

You mean plot.default().
Yes, that would be quite dangerous to do and you give a good example:

PaulG> this the default for plot. Plot gets used by other
PaulG> things (like matplot) where this default may not make
PaulG> much sense. (But I may have missed too much of the
PaulG> earlier discussion under some other subject.)

or I was not clear enough:
For R 2.2.0, the option would only be used in plot.lm().
Since I'd set its default to TRUE,  plot.lm()'s panels would use
panel.smooth(x,y,...) rather than points(x,y,...), 
and this actually does look quite useful.

Martin

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


Re: [Rd] Lists and data frames (PR#8143)

2005-09-19 Thread Uwe Ligges
Gavin Simpson wrote:

> On Mon, 2005-09-19 at 15:34 +0200, [EMAIL PROTECTED] wrote:
> 
>>Full_Name: Frank Wagner
>>Version: R 2.1.1
>>OS: Windows
>>Submission from: (NULL) (193.174.73.34)
>>
>>
>>Hi,
>>The pdf file R-intro descripe on page 27 that lists can be extended by adding
>>numbers.
>>Unfortunately, it's not working 
>>## example :
>>
>># if i did not declare the variable an error occurs : object not found
>>mylist <- list() 
>>mylist[1] <- list(value1=3, value2=5)
>>## Error
> 
> 
> You need to use [[x]] to subset a list:
> 
> 
>>mylist <- list()
>>mylist[[1]] <- list(value1=3, value2=5)
>>mylist
> 
> [[1]]
> [[1]]$value1
> [1] 3
> 
> [[1]]$value2
> [1] 5


This is a list of a list, but that is not the same as the stuff we are 
discussing here. See below.


> 
>>str(mylist)
> 
> List of 1
>  $ :List of 2
>   ..$ value1: num 3
>   ..$ value2: num 5
> 
> I don't know whether there is a typo on page 27 or not: [x] is valid, it
> just means something different to [[x]] - as explained on page 26 of
> said manual. If it was intentional, then IMHO it is not the most clear
> example of extending a list - the [[x]] notation is what I would expect
> to have to use - after reading page 26 of course...

Folks, please specify which version of the manual you are speaking 
about, e.g. by giving a chapter's/section's name.

The statement on what is referred to page 27 in this thread is completly 
correct.

Note that a list is nothing else than a vector of mode list which 
contains in each element a list of length one.

Hence you *can* say
mylist[1:2] <- list(value1=3, value2=5)
or
c(mylist, list(value1=3, value2=5))
or whatever.


Uwe Ligges



> HTH
> 
> G

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


Re: [Rd] automatically adding smooth to plot: options("plot.add.smooth")

2005-09-19 Thread Paul Gilbert


Duncan Murdoch wrote:

> On 9/19/2005 10:01 AM, Paul Gilbert wrote:
> 
>> Martin Maechler wrote:
>>
>>> I've changed the subject in the hope some more people would
>>> voice an opinion...
>>
>>
>> ...
>>
>>> Now I even propose to have
>>>   options(add.smooth = TRUE)
>>>
>>> as a new default.
>>>
>>> Do I get a reaction now?
>>> Martin
>>
>>
>> I think you may break a lot of things if you make this the default for 
>> plot. Plot gets used by other things (like matplot) where this default 
>> may not make much sense. (But I may have missed too much of the 
>> earlier discussion under some other subject.)
> 
> 
> This was going to affect only plot.lm, as far as I know.

 From the earlier discussion I thought so, but it was not really clear 
in the new subject line.

Paul
> 
> Duncan Murdoch

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


Re: [Rd] looks in liblapack.a not liblapack.so

2005-09-19 Thread Peter Dalgaard
Martyn Plummer <[EMAIL PROTECTED]> writes:

> > The 'recompile with -fPIC' is bullsh*t.  The problem is that is is looking
> > in /usr/lib64/liblapack.a rather than /usr/lib64/liblapack.so.3 both of 
> > which
> > exist.  Some searching for this error message on Google shows a lot of
> > questions about this problem but no solution that I found other than
> > 
> > rm /usr/lib64/liblapack.a
> > 
> > which I don't consider a solution.  It will link with the .so as the bottom
> > of the script shows

> You would need to modify the LDFLAGS and CPPFLAGS environment variables,
> as these default to -L/usr/local/lib and -I/usr/local/include
> respectively.  See Appendix B.3.3 of the R Installation and
> Administration manual, which gives a warning about 64-bit systems.
> 
> You can also use the --with-readline configure flag to specify the exact
> location of the readline library you wish to use.

How did _readline_ get into this?

As a curiosity, I tried looking at what Fedora Core 4 does with this.
So I looked for liblapack.a with locate, and it found one in /usr/lib
(on a 32bit system). Then I went to have a closer look at the library
and it turned out not to be there -- apparently the recent update to
lapack had wiped it out, but the locate database was not yet
rebuilt...

This sort of suggests to me that removing the .a file might actually
be a sensible thing to do on SuSE as well. 

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

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


Re: [Rd] looks in liblapack.a not liblapack.so

2005-09-19 Thread Martyn Plummer
On Mon, 2005-09-19 at 17:10 +0200, Peter Dalgaard wrote:
> Martyn Plummer <[EMAIL PROTECTED]> writes:
> 
> > > The 'recompile with -fPIC' is bullsh*t.  The problem is that is is looking
> > > in /usr/lib64/liblapack.a rather than /usr/lib64/liblapack.so.3 both of 
> > > which
> > > exist.  Some searching for this error message on Google shows a lot of
> > > questions about this problem but no solution that I found other than
> > > 
> > > rm /usr/lib64/liblapack.a
> > > 
> > > which I don't consider a solution.  It will link with the .so as the 
> > > bottom
> > > of the script shows
> 
> > You would need to modify the LDFLAGS and CPPFLAGS environment variables,
> > as these default to -L/usr/local/lib and -I/usr/local/include
> > respectively.  See Appendix B.3.3 of the R Installation and
> > Administration manual, which gives a warning about 64-bit systems.
> > 
> > You can also use the --with-readline configure flag to specify the exact
> > location of the readline library you wish to use.
> 
> How did _readline_ get into this?

I meant --with-lapack.  My fingers have their very own autocomplete
feature, which is a little buggy.  

> As a curiosity, I tried looking at what Fedora Core 4 does with this.
> So I looked for liblapack.a with locate, and it found one in /usr/lib
> (on a 32bit system). Then I went to have a closer look at the library
> and it turned out not to be there -- apparently the recent update to
> lapack had wiped it out, but the locate database was not yet
> rebuilt...

Fedora have just split off a separate lapack-devel package containing
the static library and the symlink liblapack.so.  (Mandrake/Mandriva has
been doing this for some time. I don't know about SuSE).  The up2date
service will recognize that it needs to update lapack, but I guess that
it won't install lapack-devel, as it doesn't know you need it.

It might have been better to do this in the next release, rather than as
an update to FC4, but there you go. Better install lapack-devel
manually.

> This sort of suggests to me that removing the .a file might actually
> be a sensible thing to do on SuSE as well. 

M.

---
This message and its attachments are strictly confidential. ...{{dropped}}

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


Re: [Rd] Lists and data frames (PR#8143)

2005-09-19 Thread Gavin Simpson
On Mon, 2005-09-19 at 16:39 +0200, Uwe Ligges wrote: 
> Gavin Simpson wrote:
> 
> > On Mon, 2005-09-19 at 15:34 +0200, [EMAIL PROTECTED] wrote:
> > 
> >>Full_Name: Frank Wagner
> >>Version: R 2.1.1
> >>OS: Windows
> >>Submission from: (NULL) (193.174.73.34)
> >>
> >>
> >>Hi,
> >>The pdf file R-intro descripe on page 27 that lists can be extended by 
> >>adding
> >>numbers.
> >>Unfortunately, it's not working 
> >>## example :
> >>
> >># if i did not declare the variable an error occurs : object not found
> >>mylist <- list() 
> >>mylist[1] <- list(value1=3, value2=5)
> >>## Error
> > 
> > 
> > You need to use [[x]] to subset a list:
> > 
> > 
> >>mylist <- list()
> >>mylist[[1]] <- list(value1=3, value2=5)
> >>mylist
> > 
> > [[1]]
> > [[1]]$value1
> > [1] 3
> > 
> > [[1]]$value2
> > [1] 5
> 
> 
> This is a list of a list, but that is not the same as the stuff we are 
> discussing here. See below.
> 
> 
> > 
> >>str(mylist)
> > 
> > List of 1
> >  $ :List of 2
> >   ..$ value1: num 3
> >   ..$ value2: num 5
> > 
> > I don't know whether there is a typo on page 27 or not: [x] is valid, it
> > just means something different to [[x]] - as explained on page 26 of
> > said manual. If it was intentional, then IMHO it is not the most clear
> > example of extending a list - the [[x]] notation is what I would expect
> > to have to use - after reading page 26 of course...
> 
> Folks, please specify which version of the manual you are speaking 
> about, e.g. by giving a chapter's/section's name.

R-patched Section 6.1 and 6.2 - (pdf version). Which was stated in
Frank's original email which I included, as was R version info.

> 
> The statement on what is referred to page 27 in this thread is completly 
> correct.

I would say what we are discussing here is a matter of interpreting what
the OP was intending to do. If the OP wanted to replace the first
component of mylist then [[1]] is needed. If it was the first sublist of
mylist then [1] is called for.

I interpreted the OP as the former; wanting to put a list in the first
component of mylist - because that is what the example on page 27 states
it is doing (depending on what "component" means - see below).

Confusion arises, because it depends on what you take "components" to
mean in para 2, page 27. In the paragraph above para 2 on page 27, a
list is defined and "components" refers to the bits extracted by [[ ]].
[x] extracts a list containing the xth component. So when para 2 states
that if you wish to add more components to the list you use [ ], isn't
this contradicting the previous paragraph?

mylist <- list(comp1 = 1, comp2 = matrix(1:10, ncol = 2), comp3 =
"comp3")
> mylist
$comp1
[1] 1

$comp2
 [,1] [,2]
[1,]16
[2,]27
[3,]38
[4,]49
[5,]5   10

$comp3
[1] "comp3"

> mylist[[2]]
 [,1] [,2]
[1,]16
[2,]27
[3,]38
[4,]49
[5,]5   10

> mylist[1] <- list(comp5 = 1:10, comp6 = 1:10)
Warning message:
number of items to replace is not a multiple of replacement length
> mylist[[1]] <- list(comp5 = 1:10, comp6 = 1:10) ## or
> mylist[1] <- list(list(comp5 = 1:10, comp6 = 1:10))

And here I *do* want to replace the first component with a list (itself
with two components)

Which is because [[ ]] extracts the "component", whereas [ ] extracts a
[sub]list:

> class(mylist[[2]])
[1] "matrix"
> class(mylist[2])
[1] "list"

So, it depends what you mean by a "component".

At the very least, the use of "component" in the first two paragraphs of
page 27 (pdf version) is confusing as the two uses do not correspond to
the same "thing". I would go as far as saying contradictory - but that
might be nit-picking and depends on your definition of "extracts" ;-)

Wouldn't the following be better:

Lists, like any subscripted object, can be extended by specifying
additional components. To add new /components/ you could:

> Mat <- matrix(1:100, ncol = 10) ## not defined previously
> ## add Mat to component 5 of Lst
> Lst[[5]] <- Mat
> ## or
> Lst[5] <- list(Matrix = Mat)
> ## or, replace Lst[[5]] with a list with 2 components
> Lst[[5]] <- list(Matrix1 = Mat, Matrix2 = Mat)

See Section 6.1 for the differences.

Personally, I find Lst[[5]] <- Mat more intuitive than having to wrap it
in list().

Just my USD1.50 worth (judging by the length of this email)

G

> 
> Note that a list is nothing else than a vector of mode list which 
> contains in each element a list of length one.
> 
> Hence you *can* say
> mylist[1:2] <- list(value1=3, value2=5)
> or
> c(mylist, list(value1=3, value2=5))
> or whatever.
> 
> 
> Uwe Ligges
> 
> 
> 
> > HTH
> > 
> > G
> 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography   [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way[W] h

Re: [Rd] looks in liblapack.a not liblapack.so

2005-09-19 Thread Gavin Simpson
On Mon, 2005-09-19 at 17:40 +0200, Martyn Plummer wrote:
> On Mon, 2005-09-19 at 17:10 +0200, Peter Dalgaard wrote:
> > Martyn Plummer <[EMAIL PROTECTED]> writes:
> > 
> > > > The 'recompile with -fPIC' is bullsh*t.  The problem is that is is 
> > > > looking
> > > > in /usr/lib64/liblapack.a rather than /usr/lib64/liblapack.so.3 both of 
> > > > which
> > > > exist.  Some searching for this error message on Google shows a lot of
> > > > questions about this problem but no solution that I found other than
> > > > 
> > > > rm /usr/lib64/liblapack.a
> > > > 
> > > > which I don't consider a solution.  It will link with the .so as the 
> > > > bottom
> > > > of the script shows
> > 
> > > You would need to modify the LDFLAGS and CPPFLAGS environment variables,
> > > as these default to -L/usr/local/lib and -I/usr/local/include
> > > respectively.  See Appendix B.3.3 of the R Installation and
> > > Administration manual, which gives a warning about 64-bit systems.
> > > 
> > > You can also use the --with-readline configure flag to specify the exact
> > > location of the readline library you wish to use.
> > 
> > How did _readline_ get into this?
> 
> I meant --with-lapack.  My fingers have their very own autocomplete
> feature, which is a little buggy.  
> 
> > As a curiosity, I tried looking at what Fedora Core 4 does with this.
> > So I looked for liblapack.a with locate, and it found one in /usr/lib
> > (on a 32bit system). Then I went to have a closer look at the library
> > and it turned out not to be there -- apparently the recent update to
> > lapack had wiped it out, but the locate database was not yet
> > rebuilt...
> 
> Fedora have just split off a separate lapack-devel package containing
> the static library and the symlink liblapack.so.  (Mandrake/Mandriva has
> been doing this for some time. I don't know about SuSE).  The up2date
> service will recognize that it needs to update lapack, but I guess that
> it won't install lapack-devel, as it doesn't know you need it.
> 
> It might have been better to do this in the next release, rather than as
> an update to FC4, but there you go. Better install lapack-devel
> manually.

Yep, and the same with BLAS - which just caused me to spend half a day
wondering why R wasn't being configured with BLAS(generic) anymore when
trying out R2.2.0 alpha at home...

G

> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography   [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

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


[Rd] how to extract the column name or value from the numerical value of the matrix

2005-09-19 Thread shanmuha boopathy
Dear sir,
 i have a matrix like
 x<-c(1:20)
A<-matrix(x,4,5)
> A
 [,1] [,2] [,3] [,4] [,5]
[1,]159   13   17
[2,]26   10   14   18
[3,]37   11   15   19
[4,]48   12   16   20

I want to extract the column value for the matrix
value 11...

or the row value for 14..
how it is possible?

thanks for your help

with regards,
boopathy.

Thirumalai Shanmuha Boopathy, 
Zimmer no : 07-15,
Rütscher strasse 165, 
52072  Aachen . 
Germany.
 
Home zone   :  0049 - 241 - 9813409
Mobile zone :  0049 - 176 - 23567867

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


Re: [Rd] [R] how to extract the column name or value from the numerical value of the matrix

2005-09-19 Thread Greg Snow
look at ?col and ?row.  One way to use them is:

col(A)[A==11]
row(A)[A==14]

hope this helps,

Greg Snow, Ph.D.
Statistical Data Center, LDS Hospital
Intermountain Health Care
[EMAIL PROTECTED]
(801) 408-8111

>>> shanmuha boopathy <[EMAIL PROTECTED]> 09/19/05 01:30PM >>>
Dear sir,
 i have a matrix like
 x<-c(1:20)
A<-matrix(x,4,5)
> A
 [,1] [,2] [,3] [,4] [,5]
[1,]159   13   17
[2,]26   10   14   18
[3,]37   11   15   19
[4,]48   12   16   20

I want to extract the column value for the matrix
value 11...

or the row value for 14..
how it is possible?

thanks for your help

with regards,
boopathy.

Thirumalai Shanmuha Boopathy, 
Zimmer no : 07-15,
Rütscher strasse 165, 
52072  Aachen . 
Germany.
 
Home zone   :  0049 - 241 - 9813409
Mobile zone :  0049 - 176 - 23567867

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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