Re: [R] Installing rgl in R2.0.1

2004-11-22 Thread Prof Brian Ripley
On Sun, 21 Nov 2004, Duncan Murdoch wrote:
On Mon, 22 Nov 2004 13:10:59 +1300 (NZDT), "Richard A. O'Keefe"
<[EMAIL PROTECTED]> wrote:
I'm running R2.0.1 under Solaris 2.9 on a SunBlade 100.
When I installed it, I set things up to use the Sun compilers
cc, CC, f95 with the options recommended in the installation and
administration guide.
Until today, no worries.
With all this discussion about R GUIs I thought I'd give R Commander a go.
The web page said to install a bunch of packages first, so I did
install.packages(c("abind", "car", "effects", "lmtest", "multcomp",
+ "mvtnorm", "relimp", "rgl", "sandwich", "strucchange", "zoo"),
+ dependencies = TRUE)
Again, all went well up to a certain point.  That point was rgl.
* Installing *source* package 'rgl' ...
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2.9
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/openwin/lib, headers /usr/openwin/include
checking for libpng-config... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
CC -I/users/local/lib/R/include -I/usr/openwin/include -DHAVE_PNG_H 
-I/usr/local/include  -Wall -pedantic -fno-exceptions -fno-rtti -KPIC  -xO4 
-xlibmil -dalign -c x11lib.cpp -o x11lib.o
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored 
otherwise
...
erwise
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC -G -L/usr/local/lib -o rgl.so x11lib.o x11gui.o types.o math.o fps.o 
pixmap.o gui.o api.o device.o devicemanager.o rglview.o scene.o glgui.o 
-L/usr/openwin/lib -L/users/local/lib -R/users/local/lib -lpng12 -lz -lm 
-lstdc++ -lX11 -lXext -lGL -lGLU -lpng12 -lz -lm
ld: fatal: library -lstdc++: not found
ld: fatal: File processing errors. No output written to rgl.so
*** Error code 1
make: Fatal error: Command failed for target `rgl.so'
ERROR: compilation failed for package 'rgl'
Previous packages figured out from whatever information the R installation
squirrelled away that they should use f95 (not g77) and cc (not gcc) and
provided sensible options.  However, the rgl installation has decided to
do its own configuration, and has decided to use gcc.  That would probably
work, except that it is mixing up the Sun C++ compiler (CC) with the Gnu
command line options (-Wall -pedantic -fno-exceptions .) AND the Sun
command line options (-xO4 -xlibmil -dalign).
All my attempts to follow the
http://wsopuppenkiste.wiso.uni-goettingen.de/~dadler/rgl
link on the rgl catalogue card at CRAN have failed.
- Did I do something wrong?
- What if anything can I do about it?
I don't think you did anything wrong, but I don't know what you can do
to fix it.  uni-goettingen.de hasn't been responding for a few days.
This is quite a common error in user-written configure scripts.  (To see 
how it should be done look at e.g. foreign.  A quick look suggests more 
scripts are wrong than right.)

The way to fix it for now is to remove rgl/configure and create 
rgl/src/Makevars by hand.

The configuration is not right even for gcc/g++.  It should not be adding
-lstdc++ for example, and things like
## C language
CPPFLAGS=""
CFLAGS="-Wall -pedantic"
## C++ language
LIBS="-lstdc++"
CXXFLAGS="${CFLAGS} -fno-exceptions -fno-rtti"
are inappropriate.
--
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
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to change the significant codes default?

2004-11-22 Thread Shigeru Mase
Dear Uwe, Ted and Gabor. Thanks for your quick and kind informations.
The suggestion of Gabor combined with that of Ted works fine.
Of course, I myself would not like to change R's significant codes 
default, but I could get a deeper insight of R language mechanism.

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


Re: [R] Running R from CD?

2004-11-22 Thread Jari Oksanen
On Mon, 2004-11-22 at 02:41, bogdan romocea wrote:
> Better install and run R from a USB flash drive. This will save you
> the trouble of re-writing the CD as you upgrade and install new
> packages. Also, you can simply copy the R installation on your work
> computer (no install rights needed); R will run.
> 
I think there is a niche (= a hole in the wall) for a live CD: it is
cheaper to distribute 20 copies of CD's to your audience than 20 USB
memory sticks. Instructions would be welcome.
> 
> From: Hans van Walen 

> At work I have no permission to install R. So, would anyone know
> whether it is possible to create a CD with a running R-installation
> for a windows(XP) pc? And of course, how to?
> 
Check the file Getting-Started-with-the-Rcmdr.pdf in John Fox's Rcmdr
package. You should be able to reach this package by launching
help.start(), and then browsing its directory in the help browser
window. Go to chapter "7. Some Suggestions for Instructors" which tells
you how to make a live CD of R in Windows. I haven't tried this, since I
don't have Windows, but I sure will when I got to be an "instructor" in
a Windows class.
 
cheers, jari oksanen 
-- 
Jari Oksanen <[EMAIL PROTECTED]>

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


Re: [R] Restore sources

2004-11-22 Thread Petr Pikal
Hi

Well I did not see any reply to your question (which does not 
surprise me as you broke almost all rules from posting guide).

The answer partly depands on OS you use but your commands are 
probably stored in .Rhistory. You can view it by some text editor 
(Notepad?). I recommend you to spend some time reading FAQs 
and other documentation.

Cheers
Petr



On 20 Nov 2004 at 10:46, A. Izad wrote:

> How can I see my codes (syntax) after restoring a workspace?
> 
> Also " Summery"
> 
> 
> 
> tnx
> 
> Mike
> 
> 
> 
> 
> 
> 
>  [[alternative HTML version deleted]]
> 
> __
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

__
[EMAIL PROTECTED] 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] simulation of Gumbel copulas

2004-11-22 Thread Erin Hodgess
Dear R:

Is there a function or a reference to simulate Gumbel copulas, please?

Thanks in advance!

Sincerely,
Erin Hodgess
mailto: [EMAIL PROTECTED]
R version 2.0.1 windows

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


Re: [R] How to change the significant codes default?

2004-11-22 Thread Ted Harding
On 22-Nov-04 Shigeru Mase wrote:
> Dear Uwe, Ted and Gabor. Thanks for your quick and kind informations.
> The suggestion of Gabor combined with that of Ted works fine.
> Of course, I myself would not like to change R's significant codes 
> default, but I could get a deeper insight of R language mechanism.

So could I! Thanks, Gabor, for bringing 'body(...) <- ...' to
the surface.

Ted.



E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 22-Nov-04   Time: 09:30:47
-- XFMail --

__
[EMAIL PROTECTED] 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] Danish characters i R2.0.1 vs R1.9.1 under winXP

2004-11-22 Thread Ladelund, Steen
Hi all.

After upgrading to R2.0.1 i get

> "æ"
[1] "æ"
> "ø"
[1] "\370" 
> "å"
[1] "å"

Whereas under R1.9.1 i get

> "æ"
[1] "æ"
> "ø"
[1] "ø"
> "å"
[1] "å"

Any hints apreciated.

Steen

Steen Ladelund, statistician
+4543233275 stelad01.FUNNYAglostruphospDOTkbhamt.dk
Research Center for Prevention and Health
Glostrup University Hospital, Denmark
www.fcfs.kbhamt.dk

__
[EMAIL PROTECTED] 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] Rcmdr -> doItAndPrint -> summary method of S4-class object not in Rcmdr window but R Console

2004-11-22 Thread Pfaff, Bernhard
Dear list member,

John Fox proposed to me posting this problem to R-Help:

I have written a function suited for Rcmdr and included this in a R-file
located in Rcmdr/etc as well as an augmented `Rcmdr-menus.txt'.

Now, I am faced with the following problem:
method show() of a S4-class object works flawlessly, that is `doItAndPrint'
works flawlessly and its output is returned correctly into the Rcmdr-Window.
However, by using method summary() for the same S4-class object fails, in
the sense that the output is *not* printed in the Rcmdr window, but into the
R Console. The summary()-method contains cat() and slots of the S4-class
objects only.

My question is: How can it be achieved that method summary() of S4 objects
is printed in the RCmdr window and why, in the first instance, does it fail
to do so by using `doItAndPrint'.

Any help or pointer is much appreciated,

Best Regards
Bernhard

platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor0.1
year 2004   
month11 
day  15 
language R  
  




The information contained herein is confidential and is inte...{{dropped}}

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


Re: [R] Danish characters i R2.0.1 vs R1.9.1 under winXP

2004-11-22 Thread Prof Brian Ripley
The problem is in your OS, which thinks the character \370 is not 
printable in your locale.

Apparently this is a WinXP problem, for it also thinks \366 is not 
printable in German (and other versions of Windows thinks it is).
(Uwe Ligges pointed that out a few hours ago.)

R 1.9.1 did not check, and so made a mess of trying to print non-printable 
characters, in particular nuls and control characters.

There is no simple workaround, as you do want octal representation for 
non-printable characters (e.g. embedded nuls).  What I have proposed is 
that we override Windows' view for upper (>= 0x80) characters.

It does not seem to be common: the only reports before today were for
Chinese, which is not expected to work.
On Mon, 22 Nov 2004, Ladelund, Steen wrote:
Hi all.
After upgrading to R2.0.1 i get
"æ"
[1] "æ"
"ø"
[1] "\370"
"å"
[1] "å"
Whereas under R1.9.1 i get
"æ"
[1] "æ"
"ø"
[1] "ø"
"å"
[1] "å"
Any hints apreciated.
Steen
Steen Ladelund, statistician
+4543233275 stelad01.FUNNYAglostruphospDOTkbhamt.dk
Research Center for Prevention and Health
Glostrup University Hospital, Denmark
www.fcfs.kbhamt.dk
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
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__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Rcmdr -> doItAndPrint -> summary method of S4-class object not in Rcmdr window but R Console

2004-11-22 Thread Prof Brian Ripley
The FAQ Q8.1 does recommend that summary() methods do not print themselves 
but returned a classed object to be printed.

What doItAndPrint does is to capture the result of an explicit print, so 
it will only work for summary methods that follow that recommendation.

I do think doItAndPrint should be capturing all the output from a function 
via sink(), and not just the print of the final result.

On Mon, 22 Nov 2004, Pfaff, Bernhard wrote:
Dear list member,
John Fox proposed to me posting this problem to R-Help:
I have written a function suited for Rcmdr and included this in a R-file
located in Rcmdr/etc as well as an augmented `Rcmdr-menus.txt'.
Now, I am faced with the following problem:
method show() of a S4-class object works flawlessly, that is `doItAndPrint'
works flawlessly and its output is returned correctly into the Rcmdr-Window.
However, by using method summary() for the same S4-class object fails, in
the sense that the output is *not* printed in the Rcmdr window, but into the
R Console. The summary()-method contains cat() and slots of the S4-class
objects only.
My question is: How can it be achieved that method summary() of S4 objects
is printed in the RCmdr window and why, in the first instance, does it fail
to do so by using `doItAndPrint'.
Any help or pointer is much appreciated,
Best Regards
Bernhard
platform i386-pc-mingw32
arch i386
os   mingw32
system   i386, mingw32
status
major2
minor0.1
year 2004
month11
day  15
language R


The information contained herein is confidential and is inte...{{dropped}}
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
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
__
[EMAIL PROTECTED] 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] Left justification af dimnames in tables.

2004-11-22 Thread Ladelund, Steen
Hi helpeRs.

When I do two-ways tables dimnames in columns are almost left-adjusted:
  <- factor(rbinom(30,1,.3),labels=c("first","second"))
>  b <- a
>  table(a,b)
b
afirst second
  first  21 0
  second  0 9 

If I do a oneway table however, dimnames are right-adjusted:

table(a)
a
 first second 
21  9 

Actually I must admit I dont know if its the dimnames or/and the cell counts
that are adjusted ;-)

Is there a way that I can get left-adjusted dimnames i oneway tables.

Thans in advance

Steen


Steen Ladelund, statistician
+4543233275 stelad01FUNNYAglostruphospDOTkbhamt.dk
Research Center for Prevention and Health
Glostrup University Hospital, Denmark
www.fcfs.kbhamt.dk

__
[EMAIL PROTECTED] 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] RWinEdt, other text editors and R2.01 a problem in pasting commands

2004-11-22 Thread giovanna jona lasinio
Dear All,
In the last few days I started using the last version of R as I
encountered a problem with R1.9 and the use of RWinEdt, however the
problem shows with R2.01 as well. More precisely

1. I install R2.01 after removing old verions of R
2. I Install RWinEdt package versione RWinEdt_1.6-2 and
SWinRegistry_0.3-2 and everything seems fine
3. I recall the RWinEdt library (library(RWinEdt)) and WinEdt appears
4. now after loading a workspace I run the following command using the
paste icon in WinEdt: 
plot(x,xaxt="n",xlab="time", ylab=expression(alpha),main=nome,type="l")

And I get the following error message:
<>
>From now on the plot command stops working, it doesn't recognize any
option not even type="l" or type="b" or anything.

If I type the intrusction directly on the command window without any
previous paste operation from WinEdt the command works properly.

Furthermore if I try to paste commands by simply coping it from a text
file and pasting it on the R command window I have the same problem. I
even tried:
source("prova.txt") containing the same command line and I got the same
error:
Error in stripchart(x, ...) : unused argument(s) (xaxt ...)

I'm not very good at using Windows XP, can anyone help?

Thanks
Giovanna Jona Lasinio

__
[EMAIL PROTECTED] 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] Questions of Significance Analysis of Microarrays(SAM){siggenes}

2004-11-22 Thread pcscan
Dear All:
Significance Analysis of Microarrays(SAM)

As we know sam do multiple t.test as following
## Default S3 method:
t.test(x, y = NULL, alternative = c("two.sided", "less", "greater"),mu = 0,
paired = FALSE, var.equal = FALSE,conf.level = 0.95, ...)

 var.equal: a logical variable indicating whether to treat the two variances
as being equal. If 'TRUE' then the pooled variance is used to estimate the
variance otherwise the Welch (or Satterthwaite) approximation to the degrees
of freedom is  used.

We are curious why sam in package siggenes do not have var.equal option ?
Are there some reason ?

sam(data,cl,B=100,balanced=FALSE,mat.samp=NULL,delta=(1:10)/5,med.fdr=TRUE,s
0=NA,alpha.s0=seq(0,1,.05),include.s0=TRUE,p0=NA,lambda.p0=1,vec.lambda.p0=(
0:95)/100,
na.rm=FALSE,graphic.fdr=TRUE,thres.fdr=seq(0.5,2,0.5),ngenes=NA,iteration=3,
initial.delta=c(.1,seq(.2,2,.2),4),rand=NA)

Any help is greatly appreciated.

Sincerely. Liu Yu Ting

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


Re: [R] Questions of Significance Analysis of Microarrays(SAM){siggenes}

2004-11-22 Thread Prof Brian Ripley
Please ask questions about Bioconductor packages of the authors or on the 
Bioconductor list.

In this case, only the author can tell you why he did not do something.
On Mon, 22 Nov 2004, pcscan wrote:
Dear All:
Significance Analysis of Microarrays(SAM)
As we know sam do multiple t.test as following
## Default S3 method:
t.test(x, y = NULL, alternative = c("two.sided", "less", "greater"),mu = 0,
paired = FALSE, var.equal = FALSE,conf.level = 0.95, ...)
var.equal: a logical variable indicating whether to treat the two variances
as being equal. If 'TRUE' then the pooled variance is used to estimate the
variance otherwise the Welch (or Satterthwaite) approximation to the degrees
of freedom is  used.
We are curious why sam in package siggenes do not have var.equal option ?
Are there some reason ?
sam(data,cl,B=100,balanced=FALSE,mat.samp=NULL,delta=(1:10)/5,med.fdr=TRUE,s
0=NA,alpha.s0=seq(0,1,.05),include.s0=TRUE,p0=NA,lambda.p0=1,vec.lambda.p0=(
0:95)/100,
na.rm=FALSE,graphic.fdr=TRUE,thres.fdr=seq(0.5,2,0.5),ngenes=NA,iteration=3,
initial.delta=c(.1,seq(.2,2,.2),4),rand=NA)
Any help is greatly appreciated.
Sincerely. Liu Yu Ting
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
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
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Running R from CD?

2004-11-22 Thread John Fox
Dear Jari,

When I distribute an R Windows CD/ROM to students, I generally include both
the installer and an installed version. This allows students who don't want
to or can't install the software to use it. They pay a big penalty in speed,
however. A flash drive would provide better performance if this is a viable
option.

It's not really necessary to do anything as elaborate as in my Rcmdr
instructions if the CD is for one's own use: Just install to the CD (copy
over installed versions of whatever contributed packages you want to use)
and run rgui.exe from it.

Regards,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jari Oksanen
> Sent: Monday, November 22, 2004 3:42 AM
> To: bogdan romocea
> Cc: [EMAIL PROTECTED]; R-News
> Subject: Re: [R] Running R from CD?
> 
> On Mon, 2004-11-22 at 02:41, bogdan romocea wrote:
> > Better install and run R from a USB flash drive. This will save you 
> > the trouble of re-writing the CD as you upgrade and install new 
> > packages. Also, you can simply copy the R installation on your work 
> > computer (no install rights needed); R will run.
> > 
> I think there is a niche (= a hole in the wall) for a live 
> CD: it is cheaper to distribute 20 copies of CD's to your 
> audience than 20 USB memory sticks. Instructions would be welcome.
> > 
> > From: Hans van Walen 
> 
> > At work I have no permission to install R. So, would anyone know 
> > whether it is possible to create a CD with a running R-installation 
> > for a windows(XP) pc? And of course, how to?
> > 
> Check the file Getting-Started-with-the-Rcmdr.pdf in John 
> Fox's Rcmdr package. You should be able to reach this package 
> by launching help.start(), and then browsing its directory in 
> the help browser window. Go to chapter "7. Some Suggestions 
> for Instructors" which tells you how to make a live CD of R 
> in Windows. I haven't tried this, since I don't have Windows, 
> but I sure will when I got to be an "instructor" in a Windows class.
>  
> cheers, jari oksanen
> --
> Jari Oksanen <[EMAIL PROTECTED]>
> 
> __
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

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


RE: [R] Rcmdr -> doItAndPrint -> summary method of S4-class objectnot in Rcmdr window but R Console

2004-11-22 Thread John Fox
Dear Brian,

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Prof 
> Brian Ripley
> Sent: Monday, November 22, 2004 5:57 AM
> To: Pfaff, Bernhard
> Cc: [EMAIL PROTECTED]
> Subject: Re: [R] Rcmdr -> doItAndPrint -> summary method of 
> S4-class objectnot in Rcmdr window but R Console
> 
> The FAQ Q8.1 does recommend that summary() methods do not 
> print themselves but returned a classed object to be printed.
> 
> What doItAndPrint does is to capture the result of an 
> explicit print, so it will only work for summary methods that 
> follow that recommendation.
> 

So that's it -- I should have seen that.

> I do think doItAndPrint should be capturing all the output 
> from a function via sink(), and not just the print of the 
> final result.
> 

That would be better, wouldn't it. I'll try to figure out how to make that
work.

Thanks,
 John

> On Mon, 22 Nov 2004, Pfaff, Bernhard wrote:
> 
> > Dear list member,
> >
> > John Fox proposed to me posting this problem to R-Help:
> >
> > I have written a function suited for Rcmdr and included this in a 
> > R-file located in Rcmdr/etc as well as an augmented 
> `Rcmdr-menus.txt'.
> >
> > Now, I am faced with the following problem:
> > method show() of a S4-class object works flawlessly, that 
> is `doItAndPrint'
> > works flawlessly and its output is returned correctly into 
> the Rcmdr-Window.
> > However, by using method summary() for the same S4-class 
> object fails, 
> > in the sense that the output is *not* printed in the Rcmdr 
> window, but 
> > into the R Console. The summary()-method contains cat() and 
> slots of 
> > the S4-class objects only.
> >
> > My question is: How can it be achieved that method summary() of S4 
> > objects is printed in the RCmdr window and why, in the 
> first instance, 
> > does it fail to do so by using `doItAndPrint'.
> >
> > Any help or pointer is much appreciated,
> >
> > Best Regards
> > Bernhard
> >
> > platform i386-pc-mingw32
> > arch i386
> > os   mingw32
> > system   i386, mingw32
> > status
> > major2
> > minor0.1
> > year 2004
> > month11
> > day  15
> > language R
> >
> >
> >
> >
> > 
> --
> > -- The information contained herein is confidential and is 
> > inte...{{dropped}}
> >
> > __
> > [EMAIL PROTECTED] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> >
> >
> 
> -- 
> 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
> 
> __
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

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


Re: [R] Re: 3d Map with bars

2004-11-22 Thread partha_bagchi
Ray,

Thanks very much. That did it. 

Partha





Ray Brownrigg <[EMAIL PROTECTED]>
11/21/2004 06:38 PM

 
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [R] Re: 3d Map with bars


> From: [EMAIL PROTECTED]
> Date: Fri, 19 Nov 2004 16:53:12 -0500
>
> Thanks for reply. I need to first draw the map of USA a perspective 
plot.
> I guess thats where my problem was.
>

Try something like this:

library(maps)
states <- map("state", plot=F)
x1 <- rep(0, 3)
x2 <- rep(0, 3)
maxz <- 1
z <- matrix(c(0, 0, 0, 0, 0, 0, maxz, maxz, maxz), 3, 3)
x1[-2] <- states$range[1:2]
x2[-2] <- states$range[3:4]
x1[2] <- x1[3] - 1e-6
x2[2] <- x2[3] - 1e-6
pmat <- persp(x1, x2, z, xlab = "", ylab = "", zlab="", axes = F,
theta=0, phi=20, d=10)
lines(trans3d(states$x, states$y, 0, pmat))
latitude <- -90
longitude <- 37
myz <- 0.6
lines(trans3d(rep(latitude, 2), rep(longitude, 2), c(0, myz), pmat), 
col=2)

where trans3d is as defined in the examples for persp().

Hope this helps,
Ray Brownrigg


> Uwe Ligges <[EMAIL PROTECTED]>
> 11/19/2004 04:33 PM
>
> To: [EMAIL PROTECTED]
> cc: [EMAIL PROTECTED]
> Subject:Re: 3d Map with bars
>
>
> [EMAIL PROTECTED] wrote:
>
> > Apologies in advance for the question. I am trying to draw a map of 
the
> US
> > as a surface plot so that I would be able to drop bars on the 
different
> > states (something like Uwe Ligges' scatterplot3d example 4). I am not
> sure
> > where to start looking for such a beast. If anyone has any pointers,
> > ideas, I will be grateful.
> >
> > TIA,
> > Partha
>
> How to "drop bars" with persp() has been described on R-help yesterday
> or today, please check the mailing list's archives.
>

__
[EMAIL PROTECTED] 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] R: simulation of Gumbel copulas

2004-11-22 Thread Vito Ricci
Hi,

I found this document, but it concerns S+. If it could
interest you'll see:

http://faculty.washington.edu/ezivot/book/QuanCopula.pdf

Cordially
Vito




You wrote:

Dear R:

Is there a function or a reference to simulate Gumbel
copulas, please?

Thanks in advance!

Sincerely,
Erin Hodgess
mailto: hodgess at gator.uhd.edu
R version 2.0.1 windows

=
Diventare costruttori di soluzioni
Became solutions' constructors

"The business of the statistician is to catalyze 
the scientific learning process."  
George E. P. Box


Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese  http://www.modugno.it/archivio/palese/

__
[EMAIL PROTECTED] 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] R: simulation of Gumbel copulas

2004-11-22 Thread Vito Ricci
I'm sorry for another posting, but I found also this
message in S news:

http://www.biostat.wustl.edu/archives/html/s-news/2000-01/msg00058.html

Bye 
Vito

you wrote:

Dear R:

Is there a function or a reference to simulate Gumbel
copulas, please?

Thanks in advance!

=
Diventare costruttori di soluzioni
Became solutions' constructors

"The business of the statistician is to catalyze 
the scientific learning process."  
George E. P. Box


Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese  http://www.modugno.it/archivio/palese/

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


Re: [R] Running R from CD?

2004-11-22 Thread Prof Brian Ripley
Let's be a little careful here.  An R for Windows installation is 
relocatable, so you can just install it into a temporary directory and 
burn a copy of that onto CD.  (That may not be true after installing 
packages into a non-default library.)  It is not true of a Unix or MacOS X 
installation, as far as I am aware, for they have absolute paths coded 
into the files.

However, an R session does need to be able to write to a temporary 
directory, and also needs a `home' directory and at a last resort the 
latter defaults to the current directory.  So you do need to be running on 
a machine on which you have a writable area.

A policy that says you cannot install a program, but you can run from a CD 
and you can let such a program write to your area seems full of holes to 
me.  (Ours does not allow low-privilege users to run programs from a CD.)
Also, many organizations ban the use of USB drives for security reasons.

BTW, I believe running R 2.0.x from a CD will be a lot slower than 1.9.1
because of lazy loading and frequent file accesses: that's a theoretical 
issue we intend to address for 2.1.0, but not one anyone has yet commented 
that it is a problem.

On Mon, 22 Nov 2004, Jari Oksanen wrote:
On Mon, 2004-11-22 at 02:41, bogdan romocea wrote:
Better install and run R from a USB flash drive. This will save you
the trouble of re-writing the CD as you upgrade and install new
packages. Also, you can simply copy the R installation on your work
computer (no install rights needed); R will run.
I think there is a niche (= a hole in the wall) for a live CD: it is
cheaper to distribute 20 copies of CD's to your audience than 20 USB
memory sticks. Instructions would be welcome.
From: Hans van Walen 

At work I have no permission to install R. So, would anyone know
whether it is possible to create a CD with a running R-installation
for a windows(XP) pc? And of course, how to?
Check the file Getting-Started-with-the-Rcmdr.pdf in John Fox's Rcmdr
package. You should be able to reach this package by launching
help.start(), and then browsing its directory in the help browser
window. Go to chapter "7. Some Suggestions for Instructors" which tells
you how to make a live CD of R in Windows. I haven't tried this, since I
don't have Windows, but I sure will when I got to be an "instructor" in
a Windows class.
cheers, jari oksanen
--
Jari Oksanen <[EMAIL PROTECTED]>
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
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
__
[EMAIL PROTECTED] 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] GCC

2004-11-22 Thread Campbell
> version
 _   
platform sparc-sun-solaris2.9
arch sparc   
os   solaris2.9  
system   sparc, solaris2.9   
status   
major1   
minor7.1 
year 2003
month06  
day  16  
language R   


I would like to upgrade to 2.0.1.  What is the most recent GCC compiler
for which there has been a succesful build?

Phineas

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


Re: [R] Left justification af dimnames in tables.

2004-11-22 Thread Peter Dalgaard
"Ladelund, Steen" <[EMAIL PROTECTED]> writes:

> Hi helpeRs.
> 
> When I do two-ways tables dimnames in columns are almost left-adjusted:
>   <- factor(rbinom(30,1,.3),labels=c("first","second"))
> >  b <- a
> >  table(a,b)
> b
> afirst second
>   first  21 0
>   second  0 9 
> 
> If I do a oneway table however, dimnames are right-adjusted:
> 
> table(a)
> a
>  first second 
> 21  9 
> 
> Actually I must admit I dont know if its the dimnames or/and the cell counts
> that are adjusted ;-)
> 
> Is there a way that I can get left-adjusted dimnames i oneway tables.
> 
> Thans in advance

This was actually an inadvertent change in R 1.7.0. It is fixed in the
development version of R but it was decided to keep the fix out of the
patch versions because it would change a lot of printed output (and
some people run automatic checks for that). For a twoway table,
there's a simple workaround:

> print(table(a,b),right=T)
b
afirst second
  first 21  0
  second 0  9

Unfortunately, it doesn't seem to work for multiway tables

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


Re: [R] The hidden costs of GPL software?

2004-11-22 Thread Duncan Murdoch
On Fri, 19 Nov 2004 13:59:23 -0800, "Cliff Lunneborg"
<[EMAIL PROTECTED]> quoted John Fox:

>Why not, as previously has been proposed, replace the
>current static (and, in my view, not very useful) set of keywords in R
>documentation with the requirement that package authors supply their own
>keywords for each documented object? I believe that this is the intent
>of
>the concept entries in Rd files, but their use certainly is not required
>or
>even actively encouraged. (They're just mentioned in passing in the
>Writing
>R Extensions manual.

That would not be easy and won't happen quickly.  There are some
problems:

 - The base packages mostly don't use  \concept. (E.g. base has 365
man pages, only about 15 of them use it).  Adding it to each file is a
fairly time-consuming task.

- Before we started, we'd need to agree as to what they are for.
Right now, I think they are mainly used when the name of a concept
doesn't match the name of the function that implements it, e.g.
"modulo", "remainder", "promise", "argmin", "assertion".  The need for
this usage is pretty rare.  If they were used for everything, what
would they contain?

 - Keywording in a useful way is hard.  There are spelling issues
(e.g. optimise versus optimize); our fuzzy matching helps with those.
But there are also multiple names for the same thing, and multiple
meanings for the same name.

Duncan Murdoch

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


Re: [R] GCC

2004-11-22 Thread Prof Brian Ripley
On Mon, 22 Nov 2004, Campbell wrote:
version
_
platform sparc-sun-solaris2.9
arch sparc
os   solaris2.9
system   sparc, solaris2.9
status
major1
minor7.1
year 2003
month06
day  16
language R
I would like to upgrade to 2.0.1.  What is the most recent GCC compiler
for which there has been a succesful build?
3.4.3, the current version of gcc (and indeed all versions since the buggy 
ones mentioned in R-admin.html).

--
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
__
[EMAIL PROTECTED] 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] How to insert one element into a vector?

2004-11-22 Thread jing tang
suppose I want to insert 5 into the vector (1,2,3,4,6) between 4 and 6.
thx!
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] How to insert one element into a vector?

2004-11-22 Thread michael watson (IAH-C)
There must be a million ways of doing this!
If you want to keep the order:

v <- c(1,2,3,4,6)
sort(c(v,5))

Mick

-Original Message-
From: jing tang [mailto:[EMAIL PROTECTED] 
Sent: 22 November 2004 14:44
To: [EMAIL PROTECTED]
Subject: [R] How to insert one element into a vector?


suppose I want to insert 5 into the vector (1,2,3,4,6) between 4 and 6.
thx!

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

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


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Barry Rowlingson
michael watson (IAH-C) wrote:
There must be a million ways of doing this!
 Actually I'd say there were no ways of doing this, since I dont think 
you can actually insert into a vector - you have to create a new vector 
that produces the illusion of insertion!

 Here's a Q+D function that fails if you try and insert at the start, 
or at the end. Its very D.

insert <- function(v,e,pos){
  return(c(v[1:(pos-1)],e,v[(pos):length(v)]))
}
 > v=c(1,2,3,4,6)
 > insert(v,5,5)
 [1] 1 2 3 4 5 6
Yay.
 > insert(v,5,1)
 [1] 1 5 1 2 3 4 6
Oops.
 Cant be bothered to fix it, the principle is there.
Baz
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Roger D. Peng
?append --- look at the `after' argument.
-roger
jing tang wrote:
suppose I want to insert 5 into the vector (1,2,3,4,6) between 4 and 6.
thx!
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

--
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Deepayan Sarkar
On Monday 22 November 2004 09:19, Barry Rowlingson wrote:
> michael watson (IAH-C) wrote:
> > There must be a million ways of doing this!
>
>   Actually I'd say there were no ways of doing this, since I dont
> think you can actually insert into a vector - you have to create a
> new vector that produces the illusion of insertion!
>
>   Here's a Q+D function that fails if you try and insert at the
> start, or at the end. Its very D.
>
> insert <- function(v,e,pos){
>return(c(v[1:(pos-1)],e,v[(pos):length(v)]))
> }

Pretty much what 'append' does.

Deepayan

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


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Peter Dalgaard
Barry Rowlingson <[EMAIL PROTECTED]> writes:

> michael watson (IAH-C) wrote:
> > There must be a million ways of doing this!
> 
>   Actually I'd say there were no ways of doing this, since I dont
> think you can actually insert into a vector - you have to create a new
> vector that produces the illusion of insertion!
> 
>   Here's a Q+D function that fails if you try and insert at the start,
> or at the end. Its very D.
> 
> insert <- function(v,e,pos){
>return(c(v[1:(pos-1)],e,v[(pos):length(v)]))
> }

This is actually an exercise in a certain introductory book on R, with
the intention of having the student do the obvious c(v[1:4],5,v[5:5])
style computation and maybe think a little about the edge effects. I
only recently saw the somewhat unfortunately named append() function,
which has been in S/R ever since the blue book...:

> append(v,5,4)
[1] 1 2 3 4 5 6


-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


Re: [R] variable object naming

2004-11-22 Thread Thomas Lumley
On Mon, 22 Nov 2004, Gabor Grothendieck wrote:
Benjamin M. Osborne  uvm.edu> writes:
:
: Is it possible to give a temporary object a name that varies with each run
of a
: foreloop?  For example, I want to fill a matrix every time I run a loop, and
I
: want a new matrix with each run, with an appropriate new name.
: i.e.:
: for(i in 1:5){...  matrix.i<-some values ...}
:
: so that in the end I would have:
: matrix.1
: matrix.2
: matrix.3
: matrix.4
: matrix.5
See 7.1 of the FAQ.
Especially the part that says this probably isn't what you want to do. You 
would likely be better off with a list, and doing
matrixlist[[i]]<-some_values

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


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Barry Rowlingson
Deepayan Sarkar wrote:
Pretty much what 'append' does.
 A shame then, that help.search("insert") doesn't find 'append'! I cant 
think why anyone looking for a way of _inserting_ a value in the middle 
of a vector would think of looking at "append"!

 Python has separate insert and append methods for vectors.
 >>> x=[1,2,3,4,6]
 >>> x.insert(4,5)
 >>> x
 [1, 2, 3, 4, 5, 6]
 >>> x.append(99)
 >>> x
 [1, 2, 3, 4, 5, 6, 99]
Barry
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to insert one element into a vector?

2004-11-22 Thread Thomas Lumley
On Mon, 22 Nov 2004, Barry Rowlingson wrote:
Deepayan Sarkar wrote:
Pretty much what 'append' does.
A shame then, that help.search("insert") doesn't find 'append'! I cant think 
why anyone looking for a way of _inserting_ a value in the middle of a vector 
would think of looking at "append"!
Yes, this should be fixed.
Python has separate insert and append methods for vectors.
I don't think this is a good idea unless there are efficiency issues. 
You could always define one: the definition is fairly simple.
   insert<-append

-thomas
__
[EMAIL PROTECTED] 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] timeDate

2004-11-22 Thread Yasser El-Zein
what package should I include to use timeDate? I want to convert a
double (num of millis) into date object.

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


a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem in pasting commands

2004-11-22 Thread Uwe Ligges
giovanna jona lasinio wrote:
Dear All,
In the last few days I started using the last version of R as I
encountered a problem with R1.9 and the use of RWinEdt, however the
problem shows with R2.01 as well. More precisely
1. I install R2.01 after removing old verions of R
2. I Install RWinEdt package versione RWinEdt_1.6-2 and
SWinRegistry_0.3-2 and everything seems fine
3. I recall the RWinEdt library (library(RWinEdt)) and WinEdt appears
4. now after loading a workspace I run the following command using the
paste icon in WinEdt: 
plot(x,xaxt="n",xlab="time", ylab=expression(alpha),main=nome,type="l")

And I get the following error message:
<>
From now on the plot command stops working, it doesn't recognize any
option not even type="l" or type="b" or anything.
If I type the intrusction directly on the command window without any
previous paste operation from WinEdt the command works properly.
Furthermore if I try to paste commands by simply coping it from a text
file and pasting it on the R command window I have the same problem. I
even tried:
source("prova.txt") containing the same command line and I got the same
error:
Error in stripchart(x, ...) : unused argument(s) (xaxt ...)
I'm not very good at using Windows XP, can anyone help?
Thanks
Giovanna Jona Lasinio
Please don't complain about R-WinEdt, WinEdt, other editors, or Windows 
if the point is obviously somewhere else!

1. Have you redefined plot() in your workspace?
2. What kind of object is x (in particular it's class, please!)?
Uwe Ligges
__
[EMAIL PROTECTED] 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] RODBC and Table views

2004-11-22 Thread Hanke, Alex
This question relates to the use of the RODBC package for retrieving data
from a MS Access database. It is quite easy to retrieve data sitting in
tables but is it possible to select from views based on these tables? The
archives do not touch on this point.
sqlTables() lets me see tables and views but only the tables yield data. Do
I need to recreate these views on the R side of the connection?
Regards
Alex

Alex Hanke
Department of Fisheries and Oceans
St. Andrews Biological Station
531 Brandy Cove Road
St. Andrews, NB
Canada
E5B 2L9



[[alternative HTML version deleted]]

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


Re: [R] timeDate

2004-11-22 Thread João Mendes Moreira
library("chron")
Joao
- Original Message - 
From: "Yasser El-Zein" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 5:45 PM
Subject: [R] timeDate


what package should I include to use timeDate? I want to convert a
double (num of millis) into date object.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

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


Re: [R] timeDate

2004-11-22 Thread Gabor Grothendieck
Yasser El-Zein  gmail.com> writes:

: 
: what package should I include to use timeDate? I want to convert a
: double (num of millis) into date object.

The times class of the chron package stores times as fractions of
a day.  You could check whether or not that gives you the resolution you
need.  Install chron and issue the R commands:

library(chron)
?chron

If you only need resolution to the second then you could alternately
use the POSIXct class.

Also check out the article on dates and times in R News 4/1 which
discusses the various possibilities.

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


Re: [R] timeDate

2004-11-22 Thread Uwe Ligges
Yasser El-Zein wrote:
what package should I include to use timeDate? I want to convert a
double (num of millis) into date object.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
You might want to read the Help Desk column in R News 4 (1).
Uwe Ligges
__
[EMAIL PROTECTED] 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] plot.Map Maptools

2004-11-22 Thread DrakeGis
Hi,
  Is there any way to plot a Map with different shading patterns, instead
of color intensity, in R2.0.1 over Linux ?

  Thanks.


D


-
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

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


Re: [R] annotation problems (conditional text())

2004-11-22 Thread Johannes Graumann
Thanks! Major knot in brain unraveled ...

Joh

On Sat, 20 Nov 2004 17:43:37 +0100
Uwe Ligges <[EMAIL PROTECTED]> wrote:

> Johannes Graumann wrote:
> 
> > Hello,
> > 
> > I'm trying to annotate my plots nicely and am running into trouble.
> > This example contains two problems:
> > a) the 'text()' arguments do not show the conditional behavior I'm
> > trying to give them. I try to test for the intercept of my
> > regression and reformat the output accordingly ('+ intercept' in the
> > >= 0 case and
> > '- sqrt(intercept^2)' in the other case), which doesn't work this
> > way. b) my pasted substitute commands yield jolted output, which
> > overwrites itself ...
> > 
> > Can anyone give this newbie a nudge into the right direction?
> 
> 1. Multi-line mathematical annotation is not supported. You have to
> add them line by line.
> 
> 2. You want to use a construct such as
>if(m >= 0){
>  # code for text 1
>} else{
>  # code for text 2
>}
> rather than the one you speicfied below, which evaluates both text() 
> calls if m > 0.
> 
> Uwe Ligges
> 
> 
> > Thanks, Joh
> > 
> > if(m >= 0){
> >   text(
> > 4,0.19,
> > cex=0.75,
> > adj=0,
> > paste(
> >   substitute(
> > y == m*x+b,
> > list(
> >   m=round(m,digits=5),
> >   b=round(b,digits=5)
> > )
> >   ),
> >   "\n",
> >   substitute(
> > R^2==rsquared,
> > list(
> >   rsquared=round(summary(fit)$r.squared,digits=3)
> > )
> >   )
> > )
> >   );
> >   text(
> > 4,0.19,
> > cex=0.75,
> > adj=0,
> > paste(
> >   substitute(
> > y == m*x-b,
> > list(
> >   m=round(m,digits=5),
> >   b=round(sqrt(b^2),digits=5)
> > )
> >   ),
> >   "\n",
> >   substitute(
> > R^2==rsquared,
> > list(
> >   rsquared=round(summary(fit)$r.squared,digits=3)
> > )
> >   )
> > )
> >   )
> > }
> > 
> > __
> > [EMAIL PROTECTED] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> 
>

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


Re: [R] How to correct this

2004-11-22 Thread Paul Murrell
Hi
Mulholland, Tom wrote:
Taking note of the first post, this is what I assume you wish. Note Paul's 
caveat in the help file
"If you resize the device, all bets are off!"
require(gridBase)
x<-seq(0,1,0.2)
y<-x
pred<-matrix(c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.7, 0.7, 0.7, 0.7,
0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5,
0.7, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), 6, 6)
image(x, y, pred, col = gray(20:100/100), asp='s', axes=F, xlab=" ",
ylab="")
points(0.5, 0.5, col = 5) # the centre of the image

In this case, using grid (or gridBase) is probably overkill.  The 
symbols() function should do what you want.  For example, ...

symbols(rep(0.5, 4), rep(0.5, 4), circles=1:4, add=TRUE)
Paul

vps <- baseViewports()
pushViewport(vps$plot)
grid.circle(x=0.5, y=0.5, r=0.1, draw=TRUE,  gp=gpar(col=5))
grid.circle(x=0.5, y=0.5, r=0.3, draw=TRUE, gp=gpar(col=5))
grid.circle(x=0.5, y=0.5, r=0.5, draw=TRUE, gp=gpar(col=5))

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, 22 November 2004 1:21 PM
To: [EMAIL PROTECTED]
Subject: RE: [R] How to correct this
Hi there,
I would like to add a few circles to the following image: 
x<-seq(0,1,0.2)
y<-x
pred<-matrix(c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.7, 0.7, 0.7, 0.7,
0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5,
0.7, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), 6, 6)
image(x, y, pred, col = gray(20:100/100), asp='s', axes=F, xlab=" ",
ylab="")
points(0.5, 0.5, col = 5) # the centre of the image

The centre of these circles needs to be overlapped with the centre of
the image. Any helps are greatly appreciated.
Regards,
Jin
-Original Message-
From: Mulholland, Tom [mailto:[EMAIL PROTECTED] 
Sent: Monday, 22 November 2004 12:29 P
To: Li, Jin (CSE, Atherton)
Subject: RE: [R] How to correct this

I think you need to create a complete set of code that can be replicated
by anyone trying to help.
I ran the three grid.circle commands on my current plot and it did what
I expected it to do. It plotted three circles centred in the current
viewport. See the jpeg.
The last command using points makes me think that you need to understand
about units and the setting up of viewports. I have not played around
with this much but I think thr newsletter had an article which may be of
use (although it uses old code I think the differences are minor)
Ciao, Tom
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, 22 November 2004 10:07 AM
To: [EMAIL PROTECTED]
Subject: [R] How to correct this
Hi there,
 

I tried to add a few circles on an existing figure using the following
codes
 

grid.circle(x=0.5, y=0.5, r=0.1, draw=TRUE,  gp=gpar(col=5))
grid.circle(x=0.5, y=0.5, r=0.3, draw=TRUE, gp=gpar(col=5))
grid.circle(x=0.5, y=0.5, r=0.5, draw=TRUE, gp=gpar(col=5))
points(0.5, 0.5, col = 5) # centre of the circle
 

, but all circles moved away from the centre.  Could we do any
corrections to this? Thanks.
 

Regards,
 

Jin
==
Jin Li, PhD
Climate Impacts Modeller
CSIRO Sustainable Ecosystems
Atherton, QLD 4883
Australia
Ph: 61 7 4091 8802
Email: [EMAIL PROTECTED]  

==
 

[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
[EMAIL PROTECTED]
http://www.stat.auckland.ac.nz/~paul/
__
[EMAIL PROTECTED] 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] R(D)Com

2004-11-22 Thread Constant Depièreux
Hello,
 
Brand new user of R that I want to interface with Windew
(http://www.pcsoft.fr), I am looking for a detailed documentation of
R(D)Com. 
 
Does anybody know where I can find it, or do you have any form of experience
of the use of R with Windev?
 
Thanks for your help.
 
 
 
PS : As I am new to the group, people interested in some details about the
requestor could find his resume at address
http://e-doclib.aqte.be/docs-doc-view.php?doc_id=303.
 
Best regards.
 
Constant Depièreux
Managing Director
Applied Quality Technologies Europe sprl
Rue des Déportés 123
B-4800 Verviers
+32 87 29 21 75
www.aqte.be

 Ce message a été scanné avec Norton anti-virus, dernière mise à jour
disponible en ligne -
  

 
 

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] IFELSE across a 3D array?

2004-11-22 Thread Sander Oom
Dear all,
We are trying to clean multiple realizations of a pattern. Erroneous NODATA 
and spurious DATA occur in the realizations. As we have to do a 1000 
realizations for many patterns, efficiency of the code is important.

We need to correct the realizations with a 'mask' pattern of DATA/NODATA. 
We think an ifelse should do the job. Spurious DATA will be simply removed 
using the mask. Erroneous NODATA should be filled in by averaging across 
the cell's nearest neighbors.

The ifelse table is as follows:
IFELSE criteria to determine TARGET from realization and mask
Real  Mask  Target
10 10  10
10  1 0/1 determined through post processing function (average 
across neighbors)
0/110  10
0/1 1 0/1

We think that an APPLY on a multi dimensional array is the way to go, with 
each realization (2 dimensions) being a dimension of the array (like a 
stack of maps)

This is where we have got so far:
*
library(abind)
#Sim: 0=Absent; 1=Present; 10=NODATA
vectSim <- 
c(0,1,0,1,10,0,1,0,1,1,10,0,1,1,0,1,0,10,10,1,0,1,0,1,0,1,1,10,0,10,10,1,0,1,0,10)
#Mask: 1=DATA; 10=NODATA
vectMask <- c(10,1,10,1,1,10,1,10,1,10,10,1)
length(vectSim)
length(vectMask)

numRow<-3
numCol<-4
numReal<-3
Sim <- array(vectSim, c(numRow,numCol,numReal))
Sim
Mask <- array(vectMask, c(numRow,numCol))
Mask
SmoothSim <- apply(Sim, c(1,2), ifelse(MaskSim==10,33,99))
SmoothSim

Any help is much appreciated!
Thanks,
Sander and Alessandro.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] The hidden costs of GPL software?

2004-11-22 Thread Henrik Bengtsson
FYI, just noticed that the GPL is about (="a draft of which is due next
year") to be revised into GPL v3. Maybe they will solve part of the problems
you mention. Not much substance yet, but see

 GPL 3 to Take on IP, Patents, eWeek, November 22, 2004
 http://www.eweek.com/article2/0,1759,1730102,00.asp

and the slashdot discussion

 GPL Revision Coming Soon, slashdot, November 22, 2004
 http://slashdot.org/article.pl?sid=04/11/22/1746225&tid=117

Question to Martin Maechler: Is it ok to change the subject title to, say,
"Problem with GPL (Was: RE: ...)" when replying to a message? This thread
has covered quite a wide range of topics this far.

Cheers

Henrik Bengtsson

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Graves
> Sent: Wednesday, November 17, 2004 7:22 PM
> To: Berton Gunter
> Cc: [EMAIL PROTECTED]; 'Patrick Burns'; 'Philippe Grosjean'
> Subject: Re: [R] The hidden costs of GPL software?
> 
> 
>   I agree with Bert.  Thanks to all who contributed.  I'd like to 
> add one comment I didn't see in the thread so far: 
> 
>   The corporate legal where I work is deathly afraid of the GNU 
> General Public License (GPL), because if we touch GPL software 
> inappropriately with our commercial software, our copyrights are 
> replaced by the GPL.  This in turn means we can't charge royalties, 
> which means we can't repay the investors who covered our initial 
> development costs, and we file for bankruptcy.  The rabid capitalists 
> meet the rabid socialists and walk away, shaking their heads. 
>  (Sec. 2.b 
> of the GPL:  "You must cause any work that you distribute or publish, 
> that in whole or in part contains or is derived from the 
> Program or any 
> part thereof, to be licensed as a whole at no charge to all third 
> parties under the terms of this License."  We can get around this by 
> packaging accesses to GPL software as separately installed add-on(s), 
> because then only the add-on(s) would be covered by the GPL.)  Our 
> corporate legal is more concerned about a possible law suit from a 
> possible competitor than from the R Foundation, but the 
> threat is still 
> real and still being adjudicated in other cases. 
> 
>   If the GPL were not so tight on this point, someone could 
> commercialize a GUI for R without having to offer their source code 
> under the GPL. 
> 
>   However, even without this change, R seems to be the 
> platform of 
> choice for new statistical algorithm development by a growing 
> portion of 
> the international scientific community.  Moreover, from my experience 
> with this listserve, the technical support here is far superior to 
> anything I've experienced with any other software in the 40+ 
> years since 
> I wrote my first Fortran code. 
> 
>   Best Wishes,
>   spencer graves
> 
> Berton Gunter wrote:
> 
> >All:
> >
> >I have much enjoyed the discussion. Thanks to all who have 
> contibuted.
> >
> >Two quick comments:
> >
> >1. The problem of designing a GUI to make R's functionality more 
> >accessible is, I believe just one component of the larger issue of 
> >making statistical/data analysis functionality available to 
> those who 
> >need to use it but do not have sufficient understanding and 
> background 
> >to do so properly. I certainly include myself in this 
> category in many 
> >circumstances. A willingness and commitment to learning ( = 
> hard work!) 
> >is the only rational solution here, and saying that one doesn't have 
> >the time really doesn't cut it for me. Ditto for R language 
> >functionality?
> >
> >2. However, R has many attractive features for data manipulation and 
> >graphics that make it attractive for common tasks that are now done 
> >most frequently with (ugh!) Excel (NOT Statistica, Systat, et. al.). 
> >For this subset of R's functionality a GUI would be attractive. 
> >However, writing a good GUI for graphing that even begins to take 
> >advantage of R's flexibility and power in this arena is an 
> enormous -- 
> >perhaps an impossible -- task. Witness the S-Plus graphics 
> GUI, which I 
> >think is truly awful (and appears to thwart more than it helps, at 
> >least from many of the queries one sees on that news list). 
> So I'm not 
> >sanguine.
> >
> >Again, thanks to all for a thoughful and enjoyable discussion.
> >
> >-- Bert Gunter
> >Genentech Non-Clinical Statistics
> >South San Francisco, CA
> > 
> >"The business of the statistician is to catalyze the scientific 
> >learning process."  - George E. P. Box
> > 
> > 
> >
> >  
> >
> >>-Original Message-
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns
> >>Sent: Wednesday, November 17, 2004 6:28 AM
> >>To: Jan P. Smit
> >>Cc: [EMAIL PROTECTED]; Philippe Grosjean; 
> >>[EMAIL PROTECTED]
> >>Subject: Re: [R] The hidden costs of GPL software?
> >>
> >>I'm a big advocate -- perhaps even fanatic -- of  making R 
> easier for 
> >>novices in order 

Re: [R] plot.Map Maptools

2004-11-22 Thread Roger Bivand
On Mon, 22 Nov 2004, DrakeGis wrote:

> Hi,
>   Is there any way to plot a Map with different shading patterns, instead
> of color intensity, in R2.0.1 over Linux ?
> 

Yes, but not with plot.Map(). If you need to fill, or shade, you are 
working with polygons. Convert to the polylist object using Map2poly(), 
and use plot.polylist() - see help(plot.polylist) for an example with 
shading patterns (arguments angle= and density=).

Roger Bivand


>   Thanks.
> 
> 
> D
> 
> 
> -
> Stay ahead of the information curve.
> Receive GIS news and jobs on your desktop daily.
> Subscribe today to the GIS CafeNews newsletter.
> [ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
> It's informative and essential.
> 
> __
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: [EMAIL PROTECTED]

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


Re: [R] R(D)Com

2004-11-22 Thread Spencer Graves
 Have you tried "www.r-project.org" -> CRAN -> (select a local 
mirror, e.g., http://mirror.internet.tp/cran/) -> "Software:  Other" -> 
"Non-standard packages:  R-(D)COM Interface"? 

 If yes, before replying, please "read the posting guide! 
http://www.R-project.org/posting-guide.html";.  In particular, search -> 
"R site search" can be quite helpful.  Also, please provide more detail 
of what you want to do with R(D)Com, including which version of R, which 
operating system, and what you've tried already that didn't work. 

 Bon Chance!
 Spencer Graves
Constant Depièreux wrote:
Hello,
Brand new user of R that I want to interface with Windew
(http://www.pcsoft.fr), I am looking for a detailed documentation of
R(D)Com. 

Does anybody know where I can find it, or do you have any form of experience
of the use of R with Windev?
Thanks for your help.

PS : As I am new to the group, people interested in some details about the
requestor could find his resume at address
http://e-doclib.aqte.be/docs-doc-view.php?doc_id=303.
Best regards.
Constant Depièreux
Managing Director
Applied Quality Technologies Europe sprl
Rue des Déportés 123
B-4800 Verviers
+32 87 29 21 75
www.aqte.be
 Ce message a été scanné avec Norton anti-virus, dernière mise à jour
disponible en ligne -
 


[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

--
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] timeDate

2004-11-22 Thread Yasser El-Zein
>From the document it is apparent to me that I need as.POSIXct  (I have
a double representing the number of millis since 1/1/1970 and I need
to construct a datetime object). I see it showing how to construct the
time object from a string representing the time but now fro a double
of millis. Does anyone know hoe to do that?


On Mon, 22 Nov 2004 19:24:48 +0100, Uwe Ligges
<[EMAIL PROTECTED]> wrote:
> Yasser El-Zein wrote:
> 
> 
> 
> > what package should I include to use timeDate? I want to convert a
> > double (num of millis) into date object.
> >
> > __
> > [EMAIL PROTECTED] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> 
> You might want to read the Help Desk column in R News 4 (1).
> 
> Uwe Ligges
> 
>

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


Re: [R] timeDate

2004-11-22 Thread Gabor Grothendieck
Yasser El-Zein  gmail.com> writes:

> 
> >From the document it is apparent to me that I need as.POSIXct  (I have
> a double representing the number of millis since 1/1/1970 and I need
> to construct a datetime object). I see it showing how to construct the
> time object from a string representing the time but now fro a double
> of millis. Does anyone know hoe to do that?
> 

If by millis you mean milliseconds (i.e. one thousandths of a second)
then POSIXct does not support that resolution, but if rounding to 
seconds is ok then 

  structure(round(x/1000), class = c("POSIXt", "POSIXct"))

should give it to you assuming x is the number of milliseconds.

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


Re: [R] variable object naming

2004-11-22 Thread Michael Grant
Is this, i.e., using 'assign', the direction you want
to go? If so, pay attention to the 'envir' parameter.

BEGIN FROM Stat-R-US:
http://www.ku.edu/~pauljohn/R/Rtips.html#2.2
...
2.2 Create variable names "on the fly"   (10/04/2001
Paul Johnson <[EMAIL PROTECTED]>) 

Paste together a variable name, set it to a value. Use
assign. As in 

> assign(paste("file", 1, "max", sep=""), 1)
> ls()
[1] "file1max"

(Brian Ripley, June 18, 2001)
...

END FROM STAT-R-US

Regards,
Michael Grant

--- "Benjamin M. Osborne" <[EMAIL PROTECTED]>
wrote:

> Is it possible to give a temporary object a name
> that varies with each run of a
> foreloop?  For example, I want to fill a matrix
> every time I run a loop, and I
> want a new matrix with each run, with an appropriate
> new name.
> i.e.:
> for(i in 1:5){...  matrix.i<-some values ...}
> 
> so that in the end I would have:
> matrix.1
> matrix.2
> matrix.3
> matrix.4
> matrix.5
> 
> Thanks,
> Ben Osborne
> 
> --
> Botany Department
> University of Vermont
> 109 Carrigan Drive
> Burlington, VT 05405
> 
> [EMAIL PROTECTED]
> phone: 802-656-0297
> fax: 802-656-0440
> 
> __
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

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


Re: [R] timeDate

2004-11-22 Thread Don MacQueen
In which case, be aware that R's round() function rounds to the 
nearest even number when the fraction is 0.5:

 round(c(1.5,2.5))
[1] 2 2
which might not be desirable for times. Consider floor() or trunc() instead.
 floor(c(1.5,2.5))
[1] 1 2
 trunc(c(1.5,2.5))
[1] 1 2
At 9:48 PM + 11/22/04, Gabor Grothendieck wrote:
Yasser El-Zein  gmail.com> writes:
 >From the document it is apparent to me that I need as.POSIXct  (I have
 a double representing the number of millis since 1/1/1970 and I need
 to construct a datetime object). I see it showing how to construct the
 time object from a string representing the time but now fro a double
 of millis. Does anyone know hoe to do that?
If by millis you mean milliseconds (i.e. one thousandths of a second)
then POSIXct does not support that resolution, but if rounding to
seconds is ok then
  structure(round(x/1000), class = c("POSIXt", "POSIXct"))
should give it to you assuming x is the number of milliseconds.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
__
[EMAIL PROTECTED] 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] optimize in very small values

2004-11-22 Thread Troels Ring
I hope you will forgive me this simple question on titration.
I'm trying to find very small values from the algorithm below, which I 
believe is
correctly formatted, and the constants are also correct. When SID goes over 
ATOT, fitted vales are
much too low compared to the literature. I guess I must be using optimize 
in a wrong way but cannot find out how to improve it. I'm on windows, R 
2.0. Best wishes
Troels Ring, Aalborg

ATOT <- 0.019
KA <- 3e-7
KW <- 4.4e-14
SID <- 0.01
ff <- function(H,KA,SID,ATOT)
{H^3 + (KA+SID)*H^2+(KA*(SID-ATOT)-KW)*H- KA*KW}
-log10(optimize(ff,c(0,.1),tol=.Machine$double.eps,KA=KA,SID=SID,ATOT=ATOT)$minimum)
__
[EMAIL PROTECTED] 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] Danish characters i R2.0.1 vs R1.9.1 under winXP

2004-11-22 Thread Hans Gardfjell
Sorry for not reporting earlier, but the same problem exists with Swedish 
verisons
of Windows XP together with R 2.0.0 patched (but not with R 1.9.1) and the last
characters in our alphabet.
"ä"
[1] "\344" 
"ö"
[1] "\366" 
"å"
[1] "å"
"Ö"
[1] "\326" 
"Ä"
[1] "\304" 
"Å"
[1] "\305" 

Hans Gardfjell
Ecology and Environmental science
Umeå University, Sweden

The problem is in your OS, which thinks the character \370 is not 
printable in your locale.

Apparently this is a WinXP problem, for it also thinks \366 is not 
printable in German (and other versions of Windows thinks it is).
(Uwe Ligges pointed that out a few hours ago.)

R 1.9.1 did not check, and so made a mess of trying to print non-printable 
characters, in particular nuls and control characters.

There is no simple workaround, as you do want octal representation for 
non-printable characters (e.g. embedded nuls).  What I have proposed is 
that we override Windows' view for upper (>= 0x80) characters.

It does not seem to be common: the only reports before today were for
Chinese, which is not expected to work.

On Mon, 22 Nov 2004, Ladelund, Steen wrote:

/ Hi all.
/>>/
/>>/ After upgrading to R2.0.1 i get
/>>/
/>>>/ "æ"
/>>/ [1] "æ"
/>>>/ "ø"
/>>/ [1] "\370"
/>>>/ "å"
/>>/ [1] "å"
/>>/
/>>/ Whereas under R1.9.1 i get
/>>/
/>>>/ "æ"
/>>/ [1] "æ"
/>>>/ "ø"
/>>/ [1] "ø"
/>>>/ "å"
/>>/ [1] "å"
/>>/
/>>/ Any hints apreciated.
/>>/
/>>/ Steen
/>>/
/>>/ Steen Ladelund, statistician
/>>/ +4543233275 stelad01.FUNNYAglostruphospDOTkbhamt.dk
/>>/ Research Center for Prevention and Health
/>>/ Glostrup University Hospital, Denmark
/>>/ www.fcfs.kbhamt.dk
/>>/
/>>/ __
/>>/ R-help at 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
/>>/
/>/
/
--
Brian D. Ripley,  ripley at stats.ox.ac.uk 

Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/ 

University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] How to correct this

2004-11-22 Thread Mulholland, Tom
This raises the question of "best practice." My answer was predicated on the 
fact that Jin Li had been attempting to use grid.circle in the first place 
without success. I rashly made the assumption that there was already a move to 
try and use some of the more sophisticated techniques within R.

This is a good example of the comments in the "hidden costs" thread, where the 
pathways to learning R came under some scrutiny. It is also similar to the "[R] 
How to insert one element into a vector?" where it is noted that append can be 
used to insert the element. That is the function appears to be originally 
written for one purpose, but it is evident that it has a broader application 
that is not immediately recognizable from the function name. When you are new 
to R it can seem confusing that you use rect for rectangles but symbols for 
circles, or segments for lines and lines for not lines, but they really are 
lines.

I am not yet proficient enough to always know which is the best approach. 
That's even with defining best as quickest, most easily maintained or most 
readable etc etc.

Now to the point. I have formed a collection of graphics that I have prepared 
over the last two years which I use to remind myself of the little 
idiosyncrasies of the various techniques. These of course have evolved as I 
have. They mostly use data that I cannot make available. I thought it might be 
a good idea to produce reproducible code that shows the bewildering variety 
ways to skin the proverbial animal. That is to produce code that can create a 
PDF flipbook of plots. One of the first things that I do when I load a package, 
is to run the examples that produce graphical output. I tend to work backwards 
and understand processes better when I know what the final output looks like. I 
am mathematically challenged, but can often appreciate what is happening once I 
see the plot. Ideally the code would include all the bells and whistles. I say 
this because I have spent hours trying to figure out just exactly what 
something is supposed to do before finally figuring out that it wa!
 s really much simpler than I had thought. The bells and whistles should also 
show how you sometimes have to use par outside of the function (or remember 
that the ... is there for a reason) to get the effect that you want. For 
example when I load the vcd package to do mosaicplots I think I have to use 
par(xpd = TRUE) to get my multi-line labels not to be clipped.

As an evolving beast I see this as a way of demonstrating the techniques that 
are generally regarded as being "best practice" in a comprehensive manner.

In short I am volunteering. What for? I am not quite sure, but it includes 
example plots using data that helps in clarifying how the plot should be used. 
The last point means that I am not capable of producing some plots (and the 
examples in some packages already do this well) as I have no idea what they 
mean even when I have plotted the example. 

Tom Mulholland




-Original Message-
From: Paul Murrell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 23 November 2004 3:05 AM
To: Mulholland, Tom
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [R] How to correct this


Hi


Mulholland, Tom wrote:
> Taking note of the first post, this is what I assume you wish. Note Paul's 
> caveat in the help file
> 
> "If you resize the device, all bets are off!"
> 
> require(gridBase)
> x<-seq(0,1,0.2)
> y<-x
> pred<-matrix(c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.7, 0.7, 0.7, 0.7,
> 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5,
> 0.7, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), 6, 6)
> image(x, y, pred, col = gray(20:100/100), asp='s', axes=F, xlab=" ",
> ylab="")
> points(0.5, 0.5, col = 5) # the centre of the image


In this case, using grid (or gridBase) is probably overkill.  The 
symbols() function should do what you want.  For example, ...

symbols(rep(0.5, 4), rep(0.5, 4), circles=1:4, add=TRUE)

Paul


> vps <- baseViewports()
> pushViewport(vps$plot)
> grid.circle(x=0.5, y=0.5, r=0.1, draw=TRUE,  gp=gpar(col=5))
> grid.circle(x=0.5, y=0.5, r=0.3, draw=TRUE, gp=gpar(col=5))
> grid.circle(x=0.5, y=0.5, r=0.5, draw=TRUE, gp=gpar(col=5))
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, 22 November 2004 1:21 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [R] How to correct this
> 
> 
> Hi there,
> 
> I would like to add a few circles to the following image: 
> x<-seq(0,1,0.2)
> y<-x
> pred<-matrix(c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.7, 0.7, 0.7, 0.7,
> 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5, 0.7, 0.9, 0.9, 0.7, 0.5, 0.5,
> 0.7, 0.7, 0.7, 0.7, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), 6, 6)
> image(x, y, pred, col = gray(20:100/100), asp='s', axes=F, xlab=" ",
> ylab="")
> points(0.5, 0.5, col = 5) # the centre of the image
> 
> The centre of these circles needs to be overlapped with the centre of
> the image. Any helps are greatly appreciated.
> R

RE: [R] Running R from CD?

2004-11-22 Thread Mulholland, Tom
I have noticed that R 2.0 did run slower than I thought it should. It's only 
now that you've raised the issue that I realise how much slower. However since 
I only use the CD when I am working on other people's machines I can't really 
say if there are other factors impacting upon the performance. I'll dig up the 
old disk, make some comparisons and forward the results.

The bottom line is that it is not a big issue for me.

Tom Mulholland

-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
...
Subject: Re: [R] Running R from CD?
...
BTW, I believe running R 2.0.x from a CD will be a lot slower than 1.9.1
because of lazy loading and frequent file accesses: that's a theoretical 
issue we intend to address for 2.1.0, but not one anyone has yet commented 
that it is a problem.

__
[EMAIL PROTECTED] 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] Weibull survival regression

2004-11-22 Thread Eric Lim
Dear R users,
 
Please can you help me with a relatively straightforward problem that I
am struggling with? I am simply trying to plot a baseline survivor and
hazard function for a simple data set of lung cancer survival where
`futime' is follow up time in months and status is 1=dead and 0=alive.
 
Using the survival package:
 
lung.wbs <- survreg( Surv(futime, status)~ 1, data=lung, dist='weibull')
 
plot (lung.wbs)
 
Returns the error msg:
 
Error in xy.coords(x, y, xlabel, ylabel, log) : 
x and y lengths differ
 
Using the Design package:
 
lung.wbd <- psm (Surv (futime, status)~ 1, dist="weibull", data=lung,
na.action=na.omit)
 
survplot(lung.wbd)
 
Returns the error msg:
 
Error in survplot.Design(lung.wbd) : fit does not have design
information
 
Using the eha package (I have not figured out how to get baseline
function only, but have used ht=0/1 hypertension as a covariate):
 
lung.wbe <- weibreg (Surv (futime, status)~ ht, y=T, data=audit,
na.action=na.omit)
 
plot (lung.wbe)
 
I get a plot with hazard (y) against age (x) ??? I cannot control the
axes with labeling and any other covariate gets the same plot.
 
I have tried using covariates in the Design and Survival packages, but
they always return the same error msgs. I realise that the former 2 are
AFT survival models, but even when I convert the object with pphsm() in
the Design package, I get the same errors.
 
Please can anyone enlighten me as to what I seem to be doing /
understanding wrongly?
 
Regards,
 
Eric Lim
Papworth Hospital
Cambridge, UK
 
 
   futime status
 [1,]  0.4000  1
 [2,]  0.8000  1
 [3,]  7.1000  1
 [4,]  3.  1
 [5,]  0.6333  1
 [6,]  9.9333  1
 [7,]  0.5000  1
 [8,]  6.9333  1
 [9,] 23.  1
[10,]  1.7333  1
[11,] 24.6667  1
[12,]  0.0667  1
[13,] 14.4333  1
[14,]  8.8333  0
[15,] 27.5333  0
 
 

[[alternative HTML version deleted]]

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


Re: [R] Danish characters i R2.0.1 vs R1.9.1 under winXP

2004-11-22 Thread Prof Brian Ripley
Try R 2.0.1 patched instead: the bug in (some versions of?) Windows XP has 
been worked around now.

On Tue, 23 Nov 2004, Hans Gardfjell wrote:
Sorry for not reporting earlier, but the same problem exists with Swedish 
verisons
of Windows XP together with R 2.0.0 patched (but not with R 1.9.1) and the 
last
characters in our alphabet.

"ä"
[1] "\344" 
"ö"
[1] "\366" 
"å"
[1] "å"
"Ö"
[1] "\326" 
"Ä"
[1] "\304" 
"Å"
[1] "\305" 

Hans Gardfjell
Ecology and Environmental science
Umeå University, Sweden

The problem is in your OS, which thinks the character \370 is not printable 
in your locale.

Apparently this is a WinXP problem, for it also thinks \366 is not 
printable in German (and other versions of Windows thinks it is).
(Uwe Ligges pointed that out a few hours ago.)

R 1.9.1 did not check, and so made a mess of trying to print non-printable 
characters, in particular nuls and control characters.

There is no simple workaround, as you do want octal representation for 
non-printable characters (e.g. embedded nuls).  What I have proposed is 
that we override Windows' view for upper (>= 0x80) characters.

It does not seem to be common: the only reports before today were for
Chinese, which is not expected to work.

On Mon, 22 Nov 2004, Ladelund, Steen wrote:

/ Hi all.
/>>/
/>>/ After upgrading to R2.0.1 i get
/>>/
/>>>/ "æ"
/>>/ [1] "æ"
/>>>/ "ø"
/>>/ [1] "\370"
/>>>/ "å"
/>>/ [1] "å"
/>>/
/>>/ Whereas under R1.9.1 i get
/>>/
/>>>/ "æ"
/>>/ [1] "æ"
/>>>/ "ø"
/>>/ [1] "ø"
/>>>/ "å"
/>>/ [1] "å"
/>>/
/>>/ Any hints apreciated.
/>>/
/>>/ Steen
/>>/
/>>/ Steen Ladelund, statistician
/>>/ +4543233275 stelad01.FUNNYAglostruphospDOTkbhamt.dk
/>>/ Research Center for Prevention and Health
/>>/ Glostrup University Hospital, Denmark
/>>/ www.fcfs.kbhamt.dk
/>>/
/>>/ __
/>>/ R-help at 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
/>>/
/>/
/
--
Brian D. Ripley,  ripley at stats.ox.ac.uk 

Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/ 

University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
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__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html