Re: [R] how to add error bar to the data in R?

2004-09-07 Thread Marta Rufino

Hello,

Use the function xYplot from hmisc package
cheers,
Marta

__
[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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Robin Hankin
Hi guys.
Check this out:
 NaN +NA
[1] NaN
 NA + NaN
[1] NA
I thought + was commutative by definition.   What's going on?
 R.version
 _
platform powerpc-apple-darwin6.8
arch powerpc
os   darwin6.8
system   powerpc, darwin6.8
status
major1
minor9.0
year 2004
month04
day  12
language R

(Both give NA under linux, so it looks like a version-specific issue).
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
[EMAIL PROTECTED] (edit in obvious way; spam precaution)
__
[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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Prof Brian Ripley
On Tue, 7 Sep 2004, Robin Hankin wrote:

 Check this out:

I am unable to reproduce it on any of the 7 different systems I checked
(Solaris, Linux, Windows with various compilers).

   NaN +NA
 [1] NaN
   NA + NaN
 [1] NA
 
 I thought + was commutative by definition.   What's going on?

It is clearly not under your compiler/OS.  We could add a configure test 
for broken systems and fix it in arithmetic.c but it hardly seems 
worthwhile.

   R.version
   _
 platform powerpc-apple-darwin6.8
 arch powerpc
 os   darwin6.8
 system   powerpc, darwin6.8
 status
 major1
 minor9.0
 year 2004
 month04
 day  12
 language R
 
 
 (Both give NA under linux, so it looks like a version-specific issue).

Linux on that hardware?  It might be a chip issue.

-- 
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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Jari Oksanen
On Tue, 2004-09-07 at 12:47, Prof Brian Ripley wrote:
 On Tue, 7 Sep 2004, Robin Hankin wrote:
 
  Check this out:
 
 I am unable to reproduce it on any of the 7 different systems I checked
 (Solaris, Linux, Windows with various compilers).
 
NaN +NA
  [1] NaN
NA + NaN
  [1] NA
  
  I thought + was commutative by definition.   What's going on?
 
  platform powerpc-apple-darwin6.8
  arch powerpc
  os   darwin6.8
  system   powerpc, darwin6.8
  status
  (Both give NA under linux, so it looks like a version-specific issue).
 
 Linux on that hardware?  It might be a chip issue.

I tried this in Linux on Mac iBook G4, and the results were the same:
NaN+NA was NaN, just like in MacOS X version.  So it looks like a chip
issue. However, the RPM built from the src.rpm packages at CRAN failed
in some checks in Linux/iBook. 

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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Robin Hankin
Dear Professor Ripley
thank you for your reply.

   NaN +NA
 [1] NaN
   NA + NaN
 [1] NA
 I thought + was commutative by definition.   What's going on?
It is clearly not under your compiler/OS.  We could add a configure test
for broken systems and fix it in arithmetic.c but it hardly seems
worthwhile.
[snip]
  (Both give NA under linux, so it looks like a version-specific issue).
Linux on that hardware?  It might be a chip issue.

Sorry, that should read Both give NA under linux on an i686 system, 
RedHat Linux 2.4.18

In any event, + appears to be associative (which is what I was 
interested in).

best wishes
rksh
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
[EMAIL PROTECTED] (edit in obvious way; spam precaution)
__
[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] Error when running configure on xeon with r-1-9-patched

2004-09-07 Thread Gavin Simpson
Prof Brian Ripley wrote:
Is libg2c.so in your library path?  That's one common problem.
Many thanks for your reply Prof. Ripley. How can I check what my library 
path is?

cat /etc/ld.so.conf gives
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt-3.3/lib
/usr/local/lib
and I don't have LD_LIBRARY_PATH set. libg2c.so is in 
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3 and libg2c.so.0 and 
libg2c.so.0.0.0 both link from /usr/lib to libg2c.so in 
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3. This is the same setup as the 
other Fedora boxes I have compiled R on.

On Mon, 6 Sep 2004, Gavin Simpson wrote:

Dear list,
I'm having a problem configuring R-1-9-patched on a Intel Xeon machine 
running Fedora Core 2. I used svn to checkout the source, altered 
config.site to add some optimisation flags to match the Fedora rpm on 
CRAN (the flags work fine on two other P3 or P4 machines I've compiled R 
on).

(Configure does not know about P3 vs P4 vs Xeon.)
snip
The full section of the config log relating to this error is appended below.
Many thanks,
Gavin
##excerpt from config.log##
configure:25282: gcc -o conftest -D__NO_MATH_INLINES -mieee-fp -O2 -g 
-pipe -march=i386 -mcpu=i686 -I/usr/local/include -L/usr/local/lib 
conftest.c -lreadline -ldl -lncurses -lm   -L/usr/local/lib 
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3 
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. -lfrtbegin -lg2c -lm 
-lgcc_s -lieee 5
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libieee.a(.data+0x0): 
multiple definition of `_LIB_VERSION'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libieee.a(.data+0x0): 
first defined here
collect2: ld returned 1 exit status
configure:25288: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME R
| #define PACKAGE_TARNAME R
| #define PACKAGE_VERSION 1.9.1
| #define PACKAGE_STRING R 1.9.1
| #define PACKAGE_BUGREPORT [EMAIL PROTECTED]
| #define PACKAGE R
| #define VERSION 1.9.1
| #define R_PLATFORM i686-pc-linux-gnu
| #define R_CPU i686
| #define R_VENDOR pc
| #define R_OS linux-gnu
| #define Unix 1
| #ifdef __cplusplus
| extern C void std::exit (int) throw (); using std::exit;
| #endif
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBM 1
| #define HAVE_LIBNCURSES 1
| #define HAVE_LIBDL 1
| #define HAVE_LIBREADLINE 1
| #define STDC_HEADERS 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_DIRENT_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_ELF_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_FPU_CONTROL_H 1
| #define HAVE_GRP_H 1
| #define HAVE_IEEE754_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_PWD_H 1
| #define HAVE_READLINE_HISTORY_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STRING_H 1
| #define HAVE_POSIX_SETJMP 1
| #define HAVE_GLIBC2 1
| #define RETSIGTYPE void
| #define SOCKLEN_T socklen_t
| #define SIZEOF_INT 4
| #define INT_32_BITS 1
| #define SIZEOF_LONG 4
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_LONG_DOUBLE 12
| /* end confdefs.h.  */
| #define F77_DUMMY_MAIN _main
| #ifdef F77_DUMMY_MAIN
|
| #  ifdef __cplusplus
|  extern C
| #  endif
|int F77_DUMMY_MAIN() { return 1; }
|
| #endif
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:25321: result: unknown
configure:25341: error: linking to Fortran libraries from C fails
See `config.log' for more details.

--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd.  ECRC [E] [EMAIL PROTECTED]
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.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
__
[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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes:

 Dear Professor Ripley
 
 thank you for your reply.
 
 
 NaN +NA
   [1] NaN
 NA + NaN
   [1] NA
 
   I thought + was commutative by definition.   What's going on?
 
 It is clearly not under your compiler/OS.  We could add a configure test
 for broken systems and fix it in arithmetic.c but it hardly seems
 worthwhile.

Didn't we do this discussion before? AFAIR, the thing is that IEEE
specifies that NaN + whatever == whatever + NaN == NaN, but NaN is
only specified a bit pattern in the first couple of bytes. R uses a
special value in the lower bytes (1954 -- BTW, when *is* Ross'
birthday?) to signal the NA, but we can't really expect that chip
makers do what we hope they'd do with that part of the value. I think
we resolved that specific checking for this issue would be too much of
a performance killer, especially since R generally treats NaN as NA
anyway. 

 [snip]
 
(Both give NA under linux, so it looks like a version-specific issue).
 
 Linux on that hardware?  It might be a chip issue.
 
 
 Sorry, that should read Both give NA under linux on an i686 system,
 RedHat Linux 2.4.18
 
 In any event, + appears to be associative (which is what I was
 interested in).

Eh? That is something that is almost certainly not true for FP
arithmetic, e.g. 

 (1 + 1e-16) + 1e-16 == 1 + (1e-16 + 1e-16)
[1] FALSE


-- 
   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] how to add error bar to the data in R?

2004-09-07 Thread Warnes, Gregory R

Alternatively, use the plotCI() function from the gregmisc package.

-G

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 9/7/04 5:08 AM
Subject: Re: [R] how to add error bar to the data in R?


Hello,

Use the function xYplot from hmisc package
cheers,
Marta

__
[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


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Prof Brian Ripley
On 7 Sep 2004, Peter Dalgaard wrote:

 Robin Hankin [EMAIL PROTECTED] writes:
 
  Dear Professor Ripley
  
  thank you for your reply.
  
  
  NaN +NA
[1] NaN
  NA + NaN
[1] NA
  
I thought + was commutative by definition.   What's going on?
  
  It is clearly not under your compiler/OS.  We could add a configure test
  for broken systems and fix it in arithmetic.c but it hardly seems
  worthwhile.
 
 Didn't we do this discussion before? 

Certainly over NA vs 0+NA, as in this excerpt from reg-tests-1.R

## matching NAs on Solaris (MM 2002-08-02)
# x - as.double(NA)
# identical(x + 0, x)
# stopifnot(match(x + 0, x, 0) == 1)
## match failed on Solaris with some compiler settings
## NA+0 is not guaranteed to be NA: could be NaN


 AFAIR, the thing is that IEEE
 specifies that NaN + whatever == whatever + NaN == NaN, but NaN is
 only specified a bit pattern in the first couple of bytes. R uses a
 special value in the lower bytes (1954 -- BTW, when *is* Ross'
 birthday?) to signal the NA, but we can't really expect that chip
 makers do what we hope they'd do with that part of the value. I think
 we resolved that specific checking for this issue would be too much of
 a performance killer, especially since R generally treats NaN as NA
 anyway. 

-- 
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] Cox regression for prevalence estimates

2004-09-07 Thread Frank E Harrell Jr
Bernardo Rangel Tura wrote:
At , The Michaelson Institute wrote:
How can R be used to calculate the prevalence ratios using Cox 
regression +
robust variance estimates ?

Well,
In Design package have a command: cph
This command have a option robsut with default=FALSE, but in help is 
write:
 ... robust if TRUE a robust variance estimate is returned. ...

I think that is your response...
bye
Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil
No, robust is an option to coxph, not cph.  cph uses 'after the fit' 
correction using the robcov or bootcov functions in Design.

--
Frank E Harrell Jr   Professor and Chair   School of Medicine
 Department of Biostatistics   Vanderbilt University
__
[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] Error when running configure on xeon with r-1-9-patched

2004-09-07 Thread Gavin Simpson
Peter Dalgaard wrote:
Gavin Simpson [EMAIL PROTECTED] writes:

configure:25282: gcc -o conftest -D__NO_MATH_INLINES -mieee-fp -O2 -g
-pipe -march=i386 -mcpu=i686 -I/usr/local/include -L/usr/local/lib
conftest.c -lreadline -ldl -lncurses -lm   -L/usr/local/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. -lfrtbegin -lg2c
-lm -lgcc_s -lieee 5
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libieee.a(.data+0x0):
multiple definition of `_LIB_VERSION'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libieee.a(.data+0x0):
first defined here

I think this means that you're linking the same library twice. Did you
put the -lieee in there yourself? (via config.site, e.g.).
Hi Peter,
Yep, that's it. Copied far too many flags from one machine's configure 
output into the config.site file on the new machine - that'll teach me 
to do things in a hurry and late in the day! Removing the duplicated 
flags allows configure to work now.

Thanks to Peter, Prof. Ripley and Martyn for their help solving my 
error. As always it is much appreciated.

Gav
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson [T] +44 (0)20 7679 5522
ENSIS Research Fellow [F] +44 (0)20 7679 7565
ENSIS Ltd.  ECRC [E] [EMAIL PROTECTED]
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.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
__
[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] Cox regression for prevalence estimates

2004-09-07 Thread Bernardo Rangel Tura
At 09:27 07/09/2004, you wrote:
Bernardo Rangel Tura wrote:
At , The Michaelson Institute wrote:
How can R be used to calculate the prevalence ratios using Cox regression +
robust variance estimates ?
Well,
In Design package have a command: cph
This command have a option robsut with default=FALSE, but in help is write:
 ... robust if TRUE a robust variance estimate is returned. ...
I think that is your response...
bye
Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil
No, robust is an option to coxph, not cph.  cph uses 'after the fit' 
correction using the robcov or bootcov functions in Design.

--
Frank E Harrell Jr   Professor and Chair   School of Medicine
 Department of Biostatistics   Vanderbilt University
Sorry Frank!
I made a digitation mistake, but I think yours package answers the Tomas 
Karpati´s need.

Thanks in advance
Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil  
__
[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] Further png() question

2004-09-07 Thread Laura Quinn
Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
problems I was having with png(). However, I have a further question
regarding png()

Is it possible to pass a par() argument to the png() command? I am
wanting to produce 4 plots per object, which I normally acheive on an X
window by par(mfrow=c(1,4)). I have tried calling a new plot and setting
par in this way but this has no bearing when I call png().

Any suggestions?

Thanks in advance,

Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT

tel: +44 113 343 1596
fax: +44 113 343 6716
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] noncommutative addition: NA+NaN != NaN+NA

2004-09-07 Thread Bernardo Rangel Tura
At 06:17 07/09/2004, you wrote:

Hi guys.
Check this out:
 NaN +NA
[1] NaN
 NA + NaN
[1] NA
I thought + was commutative by definition.   What's going on?
In my version, both cases is NA:
  NaN +NA
[1] NA
 NA + NaN
[1] NA

R.version
 _
platform i386-pc-mingw32
arch i386
os   mingw32
system   i386, mingw32
status
major1
minor9.1
year 2004
month06
day  21
language R

Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil  
__
[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] Further png() question

2004-09-07 Thread Sean Davis
Are you calling png before your par command--I think you should.
 png (file='filename')
 par(mfrow=c(1,4))
 plot(1:10)
 plot(1:10)
 plot(1:10)
 plot(1:10)
 dev.off()
See if that works for you.
Sean
On Sep 7, 2004, at 10:37 AM, Laura Quinn wrote:
Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
problems I was having with png(). However, I have a further question
regarding png()
Is it possible to pass a par() argument to the png() command? I am
wanting to produce 4 plots per object, which I normally acheive on an X
window by par(mfrow=c(1,4)). I have tried calling a new plot and 
setting
par in this way but this has no bearing when I call png().

Any suggestions?
Thanks in advance,
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
fax: +44 113 343 6716
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
__
[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] debugging an S4 method

2004-09-07 Thread John Chambers
Bickel, David wrote:
 
 Does anyone know how to use the equivalent of debug() on an S4 method? I would like 
 R to enter the browser not for the generic function, but for the method of the class 
 that I specify.

This is what the trace() function does, if you supply the signature=
argument set to the class or combination of classes for which you want
to examine the selected method.

Typically, a call would be of the form:

trace(myFun, signature=myClass, browser, exit=browser)

which would call the browser on entry to the myClass method and again
before exiting.  See ?trace for details.

(There are a few bug fixes and added features in the upcoming 2.0.0
version).

 
 Thanks,
 David
 _
 David Bickel  http://davidbickel.com
 Research Scientist
 Pioneer Hi-Bred International
 Bioinformatics  Exploratory Research
 7250 NW 62nd Ave., PO Box 552
 Johnston, Iowa 50131-0552
 515-334-4739 Tel
 515-334-6634 Fax
 [EMAIL PROTECTED], [EMAIL PROTECTED]
 
 This communication is for use by the intended recipient and ...{{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

-- 
John M. Chambers  [EMAIL PROTECTED]
Bell Labs, Lucent Technologiesoffice: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:(908)582-3340
Murray Hill, NJ  07974web: http://www.cs.bell-labs.com/~jmc

__
[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] Further png() question

2004-09-07 Thread Uwe Ligges
Laura Quinn wrote:
Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
problems I was having with png(). However, I have a further question
regarding png()
Is it possible to pass a par() argument to the png() command? I am
wanting to produce 4 plots per object, which I normally acheive on an X
window by par(mfrow=c(1,4)). I have tried calling a new plot and setting
par in this way but this has no bearing when I call png().
You have to call par() after png() rather than before:
png(test.png)
par(mfrow=c(1,4))
replicate(4, plot(1:10))
dev.off()
Uwe Ligges

Any suggestions?
Thanks in advance,
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
fax: +44 113 343 6716
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
__
[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] Further png() question

2004-09-07 Thread partha_bagchi
The following is not a problem in R 1.9.1:

 png(file = test.png)
 par(mfrow = c(2,2))
 plot(c(1:10))
 plot(c(1:10))
 plot(c(1:10))
 plot(c(1:10))
 dev.off()
null device 
  1 


Have you tried that?

HTH,
Partha





Laura Quinn [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
09/07/2004 10:37 AM

 
To: [EMAIL PROTECTED]
cc: 
Subject:[R] Further png() question


Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
problems I was having with png(). However, I have a further question
regarding png()

Is it possible to pass a par() argument to the png() command? I am
wanting to produce 4 plots per object, which I normally acheive on an X
window by par(mfrow=c(1,4)). I have tried calling a new plot and setting
par in this way but this has no bearing when I call png().

Any suggestions?

Thanks in advance,

Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT

tel: +44 113 343 1596
fax: +44 113 343 6716
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

__
[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] Further png() question

2004-09-07 Thread Liaw, Andy
Insert the par() call after png().  par() is device-specific.

Andy

 From: Laura Quinn
 
 Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
 problems I was having with png(). However, I have a further question
 regarding png()
 
 Is it possible to pass a par() argument to the png() command? I am
 wanting to produce 4 plots per object, which I normally 
 acheive on an X
 window by par(mfrow=c(1,4)). I have tried calling a new plot 
 and setting
 par in this way but this has no bearing when I call png().
 
 Any suggestions?
 
 Thanks in advance,
 
 Laura Quinn
 Institute of Atmospheric Science
 School of Earth and Environment
 University of Leeds
 Leeds
 LS2 9JT
 
 tel: +44 113 343 1596
 fax: +44 113 343 6716
 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
 


__
[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] Further png() question

2004-09-07 Thread Petr Pikal


On 7 Sep 2004 at 15:37, Laura Quinn wrote:

 Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
 problems I was having with png(). However, I have a further question
 regarding png()
 
 Is it possible to pass a par() argument to the png() command? I am
 wanting to produce 4 plots per object, which I normally acheive on an
 X window by par(mfrow=c(1,4)). I have tried calling a new plot and
 setting par in this way but this has no bearing when I call png().

Hi

png(myplot.png, 800,800)
par(mfrow=c(1,4))
for (i in 1:4) boxplot(rnorm(10)*i)
dev.off()

seems to work or seems to produce 4 graphs on 1 png device. Is 
this what you want?

Cheers
Petr




 
 Any suggestions?
 
 Thanks in advance,
 
 Laura Quinn
 Institute of Atmospheric Science
 School of Earth and Environment
 University of Leeds
 Leeds
 LS2 9JT
 
 tel: +44 113 343 1596
 fax: +44 113 343 6716
 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

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


Re: [R] Further png() question

2004-09-07 Thread Laura Quinn
Thanks all! It appears I just had the par in the wrong place in my loop.


Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT

tel: +44 113 343 1596
fax: +44 113 343 6716
mail: [EMAIL PROTECTED]

On Tue, 7 Sep 2004, Petr Pikal wrote:



 On 7 Sep 2004 at 15:37, Laura Quinn wrote:

  Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
  problems I was having with png(). However, I have a further question
  regarding png()
 
  Is it possible to pass a par() argument to the png() command? I am
  wanting to produce 4 plots per object, which I normally acheive on an
  X window by par(mfrow=c(1,4)). I have tried calling a new plot and
  setting par in this way but this has no bearing when I call png().

 Hi

 png(myplot.png, 800,800)
 par(mfrow=c(1,4))
 for (i in 1:4) boxplot(rnorm(10)*i)
 dev.off()

 seems to work or seems to produce 4 graphs on 1 png device. Is
 this what you want?

 Cheers
 Petr




 
  Any suggestions?
 
  Thanks in advance,
 
  Laura Quinn
  Institute of Atmospheric Science
  School of Earth and Environment
  University of Leeds
  Leeds
  LS2 9JT
 
  tel: +44 113 343 1596
  fax: +44 113 343 6716
  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

 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] gridBase and heatmap

2004-09-07 Thread Sean Davis
I would like to use gridBase to place four separate heatmaps (actually,  
a stripped-down heatmap.2 from ght gregmisc package that contains only  
the image part) into four different viewports.  I can get the  
placement correct, but I keep 'losing' the previous plot.  Any  
suggestions?

Here is some quick example code trying to put a heatmap into the left  
viewport and then put a second one into the upper right.

Thanks in advance for insight
Sean
 pushViewport(viewport(layout = grid.layout(1, 3, widths =  
unit(rep(1,3), c(null, cm, null)
viewport[GRID.VP.177]
 pushViewport(viewport(layout.pos.col=1))
viewport[GRID.VP.178]
 par(omi=gridOMI(),new=T)
 my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),],breaks=c(seq(-2.5,-0.6,0.1), 
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,Colv=c(9:12,5:8,1: 
4),labRow=rep('',520),margin=c(10,5),colsep=c(4,8),trace=none,density. 
info=none,col=greenred.colors(40),key=F)
 popViewport()
viewport[GRID.VP.177]
 pushViewport(viewport(layout.pos.col=3))
viewport[GRID.VP.179]
 pushViewport(viewport(layout = grid.layout(3, 1, heights =  
unit(rep(1,3), c(null, null, null)
viewport[GRID.VP.180]
 pushViewport(viewport(layout.pos.row=1))
viewport[GRID.VP.181]
 par(omi=gridOMI(),new=T)
 my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),][tmp[505:520],],breaks=c(seq(-2.5,-0.6,0.1), 
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,labRow=sapply(getSYMBOL(as 
.character(rownames(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),])),'BrafPkg')[tmp[505:520]],function(x)  
{ifelse(is.na(x),EST,x)}),Colv=c(9:12,5:8,1: 
4),margin=c(10,5),colsep=c(4,8),trace=none,density.info=none,col=gre 
enred.colors(40),key=F)

__
[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] contrast/test statements in polynomial mixed model

2004-09-07 Thread Dede Greenstein
Hello
I am having some trouble figuring out how to write contrast/test syntax for 
the following mixed model regression  y ~ group*age  + group*age^2 random 
=~1|ID

(i have centered the age variable  there are only 2 groups)
the contrast i am trying to construct should compare the overall shape of 
the 2 groups -- in SAS,  this does the trick  -- test 'group difference in 
shape' age_squared*group1 -1; age_cent*group 1 -1

Suggestions would be greatly appreciated
Thanks in advance
Dede Greenstein
__
[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] gridBase and heatmap

2004-09-07 Thread Kevin Bartz
The problem is that most base plotting functions first wipe the graphics
device clean. To do what you want, you need to use par(new = T) liberally
between plots. Does that work for you?

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sean Davis
Sent: Tuesday, September 07, 2004 10:01 AM
To: r-help
Subject: [R] gridBase and heatmap

I would like to use gridBase to place four separate heatmaps (actually,  
a stripped-down heatmap.2 from ght gregmisc package that contains only  
the image part) into four different viewports.  I can get the  
placement correct, but I keep 'losing' the previous plot.  Any  
suggestions?

Here is some quick example code trying to put a heatmap into the left  
viewport and then put a second one into the upper right.

Thanks in advance for insight

Sean

  pushViewport(viewport(layout = grid.layout(1, 3, widths =  
unit(rep(1,3), c(null, cm, null)
viewport[GRID.VP.177]
  pushViewport(viewport(layout.pos.col=1))
viewport[GRID.VP.178]
  par(omi=gridOMI(),new=T)
  my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),],breaks=c(seq(-2.5,-0.6,0.1), 
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,Colv=c(9:12,5:8,1: 
4),labRow=rep('',520),margin=c(10,5),colsep=c(4,8),trace=none,density. 
info=none,col=greenred.colors(40),key=F)
  popViewport()
viewport[GRID.VP.177]
  pushViewport(viewport(layout.pos.col=3))
viewport[GRID.VP.179]
  pushViewport(viewport(layout = grid.layout(3, 1, heights =  
unit(rep(1,3), c(null, null, null)
viewport[GRID.VP.180]
  pushViewport(viewport(layout.pos.row=1))
viewport[GRID.VP.181]
  par(omi=gridOMI(),new=T)
  my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),][tmp[505:520],],breaks=c(seq(-2.5,-0.6,0.1), 
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,labRow=sapply(getSYMBOL(as 
.character(rownames(eb$coefficients[(clsum[,1]1)  (clsum[,2]1)   
(clsum[,3]==0),])),'BrafPkg')[tmp[505:520]],function(x)  
{ifelse(is.na(x),EST,x)}),Colv=c(9:12,5:8,1: 
4),margin=c(10,5),colsep=c(4,8),trace=none,density.info=none,col=gre 
enred.colors(40),key=F)

__
[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] gridBase and heatmap

2004-09-07 Thread Sean Davis
Kevin,
Thanks for the advice.  However, I was pretty careful to include a  
par(new=T) [see below].

Sean

On Sep 7, 2004, at 1:14 PM, Kevin Bartz wrote:
The problem is that most base plotting functions first wipe the  
graphics
device clean. To do what you want, you need to use par(new = T)  
liberally
between plots. Does that work for you?

Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sean Davis
Sent: Tuesday, September 07, 2004 10:01 AM
To: r-help
Subject: [R] gridBase and heatmap
I would like to use gridBase to place four separate heatmaps (actually,
a stripped-down heatmap.2 from ght gregmisc package that contains only
the image part) into four different viewports.  I can get the
placement correct, but I keep 'losing' the previous plot.  Any
suggestions?
Here is some quick example code trying to put a heatmap into the left
viewport and then put a second one into the upper right.
Thanks in advance for insight
Sean
pushViewport(viewport(layout = grid.layout(1, 3, widths =
unit(rep(1,3), c(null, cm, null)
viewport[GRID.VP.177]
pushViewport(viewport(layout.pos.col=1))
viewport[GRID.VP.178]
par(omi=gridOMI(),new=T)
my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1) 
(clsum[,3]==0),],breaks=c(seq(-2.5,-0.6,0.1),
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,Colv=c(9:12,5:8,1:
4),labRow=rep('',520),margin=c(10,5),colsep=c(4,8),trace=none,density 
.
info=none,col=greenred.colors(40),key=F)
popViewport()
viewport[GRID.VP.177]
pushViewport(viewport(layout.pos.col=3))
viewport[GRID.VP.179]
pushViewport(viewport(layout = grid.layout(3, 1, heights =
unit(rep(1,3), c(null, null, null)
viewport[GRID.VP.180]
pushViewport(viewport(layout.pos.row=1))
viewport[GRID.VP.181]
par(omi=gridOMI(),new=T)
my.heatmap(eb$coefficients[(clsum[,1]1)  (clsum[,2]1) 
(clsum[,3]==0),][tmp[505:520],],breaks=c(seq(-2.5,-0.6,0.1),
-0.1,0.10,seq(0.6,2.5,0.1)),dendrogram=none,labRow=sapply(getSYMBOL(a 
s
.character(rownames(eb$coefficients[(clsum[,1]1)  (clsum[,2]1) 
(clsum[,3]==0),])),'BrafPkg')[tmp[505:520]],function(x)
{ifelse(is.na(x),EST,x)}),Colv=c(9:12,5:8,1:
4),margin=c(10,5),colsep=c(4,8),trace=none,density.info=none,col=gr 
e
enred.colors(40),key=F)

__
[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


[R] using text on the x axis ticks rather than numbers

2004-09-07 Thread Rajarshi Guha
Hello,
  is there a way in which I can use text labels rather than numbers on
the x axis ticks? I basically have a vector of (say) 8 points and I want
to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
Rather than having the labels 1 .. 8 I would like to have some arbitrary
text labels.

Ideally I would like the labels to be rotated (say at 45 degrees) so
that they don't overlap with each other.

Is this possible?

Thanks,

---
Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
---
Breadth-first search is the bulldozer of science.
-- Randy Goebel

__
[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] Cox regression for prevalence estimates

2004-09-07 Thread Thomas Lumley

robust standard errors are available from coxph with the option
robust=TRUE.

-thomas

On 6 xxx -1, The Michaelson Institute wrote:

 Hello, I'm an MD working in an eye clinic. I'm learning by myself to use R
 for use in my research works and for implementation in a software project.
 There are some authors who recomends the use of Cox regression as a
 substitute for Logistic regression (a
 href=http://www.biomedcentral.com/1471-2288/3/21.pdf; Barros AJD, Hirakata
 VN. BMCMedical Research Methodology, 2003; 3:21 /a. The use of Cox
 regression permit the estimation of the prevalence rates rather than Odds
 ratios obtained by logistic regression analysis.
 Cox regression is used for time-to-event data. To obtain prevalence rates
 the time has to be constant. One of the problems of Cox regression is that
 the confidence intervals are overestimated. To correct this Barros 
 Hirakata recommend the use of robust variance estimates.
 How can R be used to calculate the prevalence ratios using Cox regression +
 robust variance estimates ?

 Thanks for your collaboration,

 Tomas Karpati MD
 The Michaelson Institute for Rehabilitation of Vision
 Hadassah Medical Organization

 __
 [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


Thomas Lumley   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]   University of Washington, Seattle

__
[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] using text on the x axis ticks rather than numbers

2004-09-07 Thread Eryk Wolski
Hi!
first supress axis drawing with param axes=FALSE in your plot function.
The use axis function to add your axes.
?axis

/E

On Tue, 7 Sep 2004, Rajarshi Guha wrote:

 Hello,
   is there a way in which I can use text labels rather than numbers on
 the x axis ticks? I basically have a vector of (say) 8 points and I want
 to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
 Rather than having the labels 1 .. 8 I would like to have some arbitrary
 text labels.

 Ideally I would like the labels to be rotated (say at 45 degrees) so
 that they don't overlap with each other.

 Is this possible?

 Thanks,

 ---
 Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net
 GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
 ---
 Breadth-first search is the bulldozer of science.
 -- Randy Goebel

 __
 [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] using text on the x axis ticks rather than numbers

2004-09-07 Thread Marc Schwartz
On Tue, 2004-09-07 at 12:52, Rajarshi Guha wrote:
 Hello,
   is there a way in which I can use text labels rather than numbers on
 the x axis ticks? I basically have a vector of (say) 8 points and I want
 to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
 Rather than having the labels 1 .. 8 I would like to have some arbitrary
 text labels.
 
 Ideally I would like the labels to be rotated (say at 45 degrees) so
 that they don't overlap with each other.
 
 Is this possible?
 
 Thanks,


Here is an example. For the axis labels, you need to use text() and not
mtext() as the latter does not allow for text rotation:

# Set margins to make room for x axis labels
par(mar = c(7, 4, 4, 2) + 0.1)

# Create plot with no x axis and no x axis label
plot(1:8, xaxt = n,  xlab = )

# Set up x axis with tick marks alone
axis(1, labels = FALSE)

# Create arbitrary text
labels - paste(arbitrary text, 1:8, sep =  )

# plot x axis labels using:
# par(usr)[3] - 0.25 as the vertical placement
# srt = 45 as text rotation angle
# adj = 1 to place right end of text at tick mark
# xpd = TRUE to allow for text outside the plot region
text(1:8, par(usr)[1] - 0.25, srt = 45, adj = 1,
 labels = labels, xpd = TRUE)

# plot x axis label at line 6 (of 7)
mtext(1, text = X Axis Label, line = 6)


You can adjust the value of the '0.25' offset as required to move the x
axis labels up or down relative to the x axis.

HTH,

Marc Schwartz

__
[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] C function name garbled

2004-09-07 Thread S Blay
I wrote an R wrapper function (phylpro) around a C function 
(Rphylpro).
The first time I'm running my function, it runs with no errors.
The second time I'm trying to run it, I get an error message 
with the first argument to .Call garbled.

Set up:
 dyn.load(Phylpro.so)
 source(phylpro.R)
 WinHalfWidth-30
 permReps-10
 breaks-c(548, 735, 832)

First call to phylpro succeeds:
 b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)


Second call to phylpro fails:
 b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)
Error in .Call(PSg\bBh\b, input_file = 
as.character(input_file), breaks = as.integer(breaks),  : 
.Call function name not in load table

Check if my C function name is in load table: 
 is.loaded(Rphylpro)
[1] TRUE


Any ideas?
Thanks for your help,

S. Blay
Department of Statistics and Actuarial Science
Simon Fraser University, Vancouver, British Columbia

__
[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] Multiple comparisons in a non parametric case

2004-09-07 Thread Marco Chiarandini
Dear all,

I am conducting a full factorial analysis. I have one factor consisting
in algorithms, which I consider my treatments, and another factor made
of the problems I want to solve. For each problem I obtain a response
variable which is stochastic. I replicate the measure of this response
value 10 times.

When I apply ANOVA the assumptions do not hold, hence I must rely on non
parametric tests.

By transforming the response data in ranks, the Friedman test tells me
that there is statistical significance in the difference of the sum of
ranks of at least one of the treatments.

I would like now to produce a plot for the multiple comparisons similar
to the Least Significant Difference or the Tukey's Honest Significant
Difference used in ANOVA. Since I am in the non parametric case I can
not use these methods.

Instead, I compare graphically individual treatments by plotting the sum
of ranks of each treatment togehter with the 95% confidence interval. To
compute the interval I use the Friedman test as suggested by Conover in
Practical Nonparametric statistics.

I obtain something like this:

Treat. A|-+-|
Treat. B  |-+-|
Treat. C   |-+-|
Treat. D   |-+-|

The intervals have all the same spread because the number of
replications was the same for all experimental units.


I would like to know if someone in the list had a similar experience and
if what I am doing is correct. In alternative also a reference to
another list which could better fit my request is welcome.


Thank you for the help,

Marco



--
Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik,
Technische Universität Darmstadt, Hochschulstraße 10,
D-64289 Darmstadt - Germany, Office: S2/02 Raum E317
Tel: +49 (0)6151 16-6802 Fax: +49 (0)6151 16-5326
email: [EMAIL PROTECTED]
web page: http://www.intellektik.informatik.tu-darmstadt.de/~machud

__
[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] C function name garbled

2004-09-07 Thread Duncan Murdoch
On Tue, 7 Sep 2004 12:46:55 -0700, S Blay [EMAIL PROTECTED] wrote :

I wrote an R wrapper function (phylpro) around a C function 
(Rphylpro).
The first time I'm running my function, it runs with no errors.
The second time I'm trying to run it, I get an error message 
with the first argument to .Call garbled.

Set up:
 dyn.load(Phylpro.so)
 source(phylpro.R)
 WinHalfWidth-30
 permReps-10
 breaks-c(548, 735, 832)

First call to phylpro succeeds:
 b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)


Second call to phylpro fails:
 b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)
Error in .Call(PSg\bBh\b, input_file = 
as.character(input_file), breaks = as.integer(breaks),  : 
.Call function name not in load table

Check if my C function name is in load table: 
 is.loaded(Rphylpro)
[1] TRUE


Any ideas?

It looks to me as though your function is doing something to mess up
R's internal data.  I'd try commenting out the whole body of the
function, then adding it back gradually to find which part causes the
trouble.

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] using text on the x axis ticks rather than numbers

2004-09-07 Thread Adaikalavan Ramasamy
Out of curiosity, why is srt not respected in mtext ? See examples below

plot(1:10, xaxt=n); 
par(srt=45)
mtext( paste(Point, LETTERS[1:10]), side=1, at=1:10 )

plot(1:10, xaxt=n); 
mtext( paste(Point, LETTERS[1:10]), side=1, at=1:10, srt=45 )


It would be nice to have 'srt' as an argument in mtext in future.

Regards, Adai



On Tue, 2004-09-07 at 20:01, Marc Schwartz wrote:
 On Tue, 2004-09-07 at 12:52, Rajarshi Guha wrote:
  Hello,
is there a way in which I can use text labels rather than numbers on
  the x axis ticks? I basically have a vector of (say) 8 points and I want
  to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
  Rather than having the labels 1 .. 8 I would like to have some arbitrary
  text labels.
  
  Ideally I would like the labels to be rotated (say at 45 degrees) so
  that they don't overlap with each other.
  
  Is this possible?
  
  Thanks,
 
 
 Here is an example. For the axis labels, you need to use text() and not
 mtext() as the latter does not allow for text rotation:
 
 # Set margins to make room for x axis labels
 par(mar = c(7, 4, 4, 2) + 0.1)
 
 # Create plot with no x axis and no x axis label
 plot(1:8, xaxt = n,  xlab = )
 
 # Set up x axis with tick marks alone
 axis(1, labels = FALSE)
 
 # Create arbitrary text
 labels - paste(arbitrary text, 1:8, sep =  )
 
 # plot x axis labels using:
 # par(usr)[3] - 0.25 as the vertical placement
 # srt = 45 as text rotation angle
 # adj = 1 to place right end of text at tick mark
 # xpd = TRUE to allow for text outside the plot region
 text(1:8, par(usr)[1] - 0.25, srt = 45, adj = 1,
  labels = labels, xpd = TRUE)
 
 # plot x axis label at line 6 (of 7)
 mtext(1, text = X Axis Label, line = 6)
 
 
 You can adjust the value of the '0.25' offset as required to move the x
 axis labels up or down relative to the x axis.
 
 HTH,
 
 Marc Schwartz
 
 __
 [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] using text on the x axis ticks rather than numbers

2004-09-07 Thread Prof Brian Ripley
On Tue, 7 Sep 2004, Adaikalavan Ramasamy wrote:

 Out of curiosity, why is srt not respected in mtext ? See examples below

It doesn't make a lot of sense.  mtext is about putting text on margin
lines, and even the ability to have text perpendicular to the axis (via
las) is rather awkward to interpret (and the interpretation will be
changed in 2.0.0).  If you are going to rotate text you need to able to
specify a point of rotation and that's much easier via text.

 It would be nice to have 'srt' as an argument in mtext in future.

You haven't been listening to the discussions pre-2.0.0 on the semantics
of `adj' (and now padj as well) in mtext.  Experts seem to find it hard to
keep even the two current cases (parallel and perpendicular) clear in
their minds.

BTW, if you want to use srt with mtext(at=) you can always use S 

-- 
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 272860 (secr)
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] Multiple comparisons in a non parametric case

2004-09-07 Thread Rolf Turner
It looks to me like what you are doing is trying to judge
significance of differences by non-overlap of single-sample
confidence intervals.  While this is appealing, it's not quite
right.

I just looked into my copy of Applied Nonparametric Statistics
(second ed.) by Wayne W. Daniel (Duxbury, 1990) but that
only deals with the situation where there is a single replicate
per block-treatment combination (whereas you have 10 reps)
and block-treatment interaction is assumed to be non-existent.

The method that Daniel prescribes in this simple setting seems to be
no more than applying the Bonferroni method of multiple comparisons.
(Daniel does not say; his book is very much a cook-book.)  So you
might simply try Bonferroni --- i.e. do all k-choose-2 pairwise
comparisons between treatments (using the appropriate 2 sample method
for each comparison) doing each comparison at the alpha/k-choose-2
significance level.  Where k = the number of treatments = 4 in your
case.  This method is not going to be super-powerful but it is
sometimes surprizing how well Bonferroni stacks up against more
``sophisticated'' methods.

Daniel gives a reference to ``Nonparametric Statistical Methods'' by
Myles Hollander and Douglas A. Wolfe, New York, Wiley, 1973, for ``an
alternative multiple comparisons formula''.  I don't have this book,
and don't know what direction Hollander and Wolfe ride off in, but it
***might*** be worth trying to get your hands on it and see.

Finally --- in what way are the assumptions of Anova violated?  The
conventional wisdom is that Anova is actually quite robust to
non-normality.  Particularly when the sample size is large --- and 10
reps per treatment combination is pretty good.  Heteroskedasticity is
more of a worry, but it's not so much of a worry when the design is
nicely balanced.  As yours is.  And finally-finally --- have you
tried transforming your data to make them a bit more normal and/or
homoskedastic?

I hope this is some help.

cheers,

Rolf Turner
[EMAIL PROTECTED]

Marco Chiarandini wrote:

 I am conducting a full factorial analysis. I have one factor
 consisting in algorithms, which I consider my treatments, and another
 factor made of the problems I want to solve. For each problem I
 obtain a response variable which is stochastic. I replicate the
 measure of this response value 10 times.
 
 When I apply ANOVA the assumptions do not hold, hence I must rely on
 non parametric tests.
 
 By transforming the response data in ranks, the Friedman test tells
 me that there is statistical significance in the difference of the
 sum of ranks of at least one of the treatments.
 
 I would like now to produce a plot for the multiple comparisons
 similar to the Least Significant Difference or the Tukey's Honest
 Significant Difference used in ANOVA. Since I am in the non
 parametric case I can not use these methods.
 
 Instead, I compare graphically individual treatments by plotting the
 sum of ranks of each treatment togehter with the 95% confidence
 interval. To compute the interval I use the Friedman test as
 suggested by Conover in Practical Nonparametric statistics.
 
 I obtain something like this:
 
 Treat. A|-+-|
 Treat. B  |-+-|
 Treat. C   |-+-|
 Treat. D   |-+-|
 
 The intervals have all the same spread because the number of
 replications was the same for all experimental units.
 
 I would like to know if someone in the list had a similar experience
 and if what I am doing is correct. In alternative also a reference to
 another list which could better fit my request is welcome.

__
[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] Multiple comparisons in a non parametric case

2004-09-07 Thread Spencer Graves
 Great summary, Rolf. 

 Just one minor issue that recently bit me:  In a data mining 
application with hundred of p-values, people want to make subtle 
distinctions based on extremely small p-values.  In such applications, 
even a modest amount of skewness (to say nothing of outliers) might have 
a surprising (and not necessarily monotonic) impact on p-values. 

 Best Wishes,
 Spencer Graves
Rolf Turner wrote:
It looks to me like what you are doing is trying to judge
significance of differences by non-overlap of single-sample
confidence intervals.  While this is appealing, it's not quite
right.
I just looked into my copy of Applied Nonparametric Statistics
(second ed.) by Wayne W. Daniel (Duxbury, 1990) but that
only deals with the situation where there is a single replicate
per block-treatment combination (whereas you have 10 reps)
and block-treatment interaction is assumed to be non-existent.
The method that Daniel prescribes in this simple setting seems to be
no more than applying the Bonferroni method of multiple comparisons.
(Daniel does not say; his book is very much a cook-book.)  So you
might simply try Bonferroni --- i.e. do all k-choose-2 pairwise
comparisons between treatments (using the appropriate 2 sample method
for each comparison) doing each comparison at the alpha/k-choose-2
significance level.  Where k = the number of treatments = 4 in your
case.  This method is not going to be super-powerful but it is
sometimes surprizing how well Bonferroni stacks up against more
``sophisticated'' methods.
Daniel gives a reference to ``Nonparametric Statistical Methods'' by
Myles Hollander and Douglas A. Wolfe, New York, Wiley, 1973, for ``an
alternative multiple comparisons formula''.  I don't have this book,
and don't know what direction Hollander and Wolfe ride off in, but it
***might*** be worth trying to get your hands on it and see.
Finally --- in what way are the assumptions of Anova violated?  The
conventional wisdom is that Anova is actually quite robust to
non-normality.  Particularly when the sample size is large --- and 10
reps per treatment combination is pretty good.  Heteroskedasticity is
more of a worry, but it's not so much of a worry when the design is
nicely balanced.  As yours is.  And finally-finally --- have you
tried transforming your data to make them a bit more normal and/or
homoskedastic?
I hope this is some help.
cheers,
Rolf Turner
[EMAIL PROTECTED]
Marco Chiarandini wrote:
 

I am conducting a full factorial analysis. I have one factor
consisting in algorithms, which I consider my treatments, and another
factor made of the problems I want to solve. For each problem I
obtain a response variable which is stochastic. I replicate the
measure of this response value 10 times.
When I apply ANOVA the assumptions do not hold, hence I must rely on
non parametric tests.
By transforming the response data in ranks, the Friedman test tells
me that there is statistical significance in the difference of the
sum of ranks of at least one of the treatments.
I would like now to produce a plot for the multiple comparisons
similar to the Least Significant Difference or the Tukey's Honest
Significant Difference used in ANOVA. Since I am in the non
parametric case I can not use these methods.
Instead, I compare graphically individual treatments by plotting the
sum of ranks of each treatment togehter with the 95% confidence
interval. To compute the interval I use the Friedman test as
suggested by Conover in Practical Nonparametric statistics.
I obtain something like this:
Treat. A|-+-|
Treat. B  |-+-|
Treat. C   |-+-|
Treat. D   |-+-|
The intervals have all the same spread because the number of
replications was the same for all experimental units.
I would like to know if someone in the list had a similar experience
and if what I am doing is correct. In alternative also a reference to
another list which could better fit my request is welcome.
   

__
[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


[R] heatmap help

2004-09-07 Thread Paul Lepp
Dear R wizards,
Hopeful someone can help me with what I believe is a pretty simple task.  I
pretty new to R so some (much) of the obvious escapes me. How do I get a
distance matrix into heatmap?  What do I tell distfun if what I'm trying to
map is already an ordered distance matrix?  I tried heatmap(x,
distfun=as.dist(x)) where x is the distance matrix but R gave me an error.
Thanks in advance for any help.

Paul Lepp

 `-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.
   `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`
 ==/==/==/==/==/
   ,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,
,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'
Paul Lepp, Ph.D.   Stanford School of Medicine

VAPAHCS, 154T   Dept. of Microbiology  Immunology
3801 Miranda Ave   Stanford University
Palo Alto, CA 94304   Stanford, CA
(650) 493-5000 x66762  fax: (650) 852-3291
http://cmgm.stanford.edu/~pwlepp  [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] heatmap help

2004-09-07 Thread Liaw, Andy
I believe you want to pass the (symmetric) matrix as is, rather than wrapped
in as.dist().  E.g.,

x - as.matrix(dist(matrix(rnorm(100), 20, 5)))
heatmap(x, symm=TRUE, scale=none)

HTH,
Andy

 From: Paul Lepp
 
 Dear R wizards,
   Hopeful someone can help me with what I believe is a 
 pretty simple task.  I
 pretty new to R so some (much) of the obvious escapes me. How 
 do I get a
 distance matrix into heatmap?  What do I tell distfun if what 
 I'm trying to
 map is already an ordered distance matrix?  I tried heatmap(x,
 distfun=as.dist(x)) where x is the distance matrix but R gave 
 me an error.
 Thanks in advance for any help.
 
 Paul Lepp
 
  `-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.
`=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`
  ==/==/==/==/==/
,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,
 ,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'
 Paul Lepp, Ph.D.   Stanford School of Medicine
 
 VAPAHCS, 154T   Dept. of Microbiology  Immunology
 3801 Miranda Ave   Stanford University
 Palo Alto, CA 94304   Stanford, CA
 (650) 493-5000 x66762fax: (650) 852-3291
 http://cmgm.stanford.edu/~pwlepp  [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] heatmap help

2004-09-07 Thread Liaw, Andy
Sorry.  I think you need the argument distfun=as.dist.  E.g.,

heatmap(x, distfun=as.dist, symm=TRUE, scale=none)

Andy

 From: Liaw, Andy
 
 I believe you want to pass the (symmetric) matrix as is, 
 rather than wrapped
 in as.dist().  E.g.,
 
 x - as.matrix(dist(matrix(rnorm(100), 20, 5)))
 heatmap(x, symm=TRUE, scale=none)
 
 HTH,
 Andy
 
  From: Paul Lepp
  
  Dear R wizards,
  Hopeful someone can help me with what I believe is a 
  pretty simple task.  I
  pretty new to R so some (much) of the obvious escapes me. How 
  do I get a
  distance matrix into heatmap?  What do I tell distfun if what 
  I'm trying to
  map is already an ordered distance matrix?  I tried heatmap(x,
  distfun=as.dist(x)) where x is the distance matrix but R gave 
  me an error.
  Thanks in advance for any help.
  
  Paul Lepp
  
   `-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.   ,-;`-:-.
 `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`,'=/ `=`
   ==/==/==/==/==/
 ,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,-=`.,=,
  ,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'
  Paul Lepp, Ph.D.   Stanford School of Medicine
  
  VAPAHCS, 154T   Dept. of Microbiology  Immunology
  3801 Miranda Ave   Stanford University
  Palo Alto, CA 94304   Stanford, CA
  (650) 493-5000 x66762  fax: 
 (650) 852-3291
  http://cmgm.stanford.edu/~pwlepp  [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
 
 
 --
 
 Notice:  This e-mail message, together with any attachments, 
 contains information of Merck  Co., Inc. (One Merck Drive, 
 Whitehouse Station, New Jersey, USA 08889), and/or its 
 affiliates (which may be known outside the United States as 
 Merck Frosst, Merck Sharp  Dohme or MSD and in Japan, as 
 Banyu) that may be confidential, proprietary copyrighted 
 and/or legally privileged. It is intended solely for the use 
 of the individual or entity named on this message.  If you 
 are not the intended recipient, and have received this 
 message in error, please notify us immediately by reply 
 e-mail and then delete it from your system.
 --
 


__
[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] pairwise comparisons

2004-09-07 Thread Rebecca Young
Hello,

I am a new R user.  I am trying to calculate vector correlations for all
pairwise comparisons in my data frame without repeats.  I am familiar with the
expand.grid function, but this includes repeats.  Is there a way to use
expand.grid and eliminate repeats?  Or is there another function that can be
used to do this?

Thank you.
Rebecca


--
Rebecca Young
Graduate Student
Ecology  Evolutionary Biology, Badyaev Lab
University of Arizona
1041 E Lowell
Tucson, AZ 85721-0088
Office: 425BSW
[EMAIL PROTECTED]
(520) 621-4005

__
[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] a little question about R

2004-09-07 Thread
Hello,sir: Here's a little question about R which needs your help.Thanks in advance. 
If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 
characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as 
following: c(a,b,c,d) and the result is:[1] a b c d.
But I remember there's a shortcut manner to do the same thing,something like 
c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the 
correct method to do it(I remember the expression is very similar with
c(a:d)). Thanks from the bottom of my heart. My best regards!

__
[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] pairwise comparisons

2004-09-07 Thread Roger D. Peng
Are you talking about repeated rows?  Does unique() do what you want?
-roger
Rebecca Young wrote:
Hello,
I am a new R user.  I am trying to calculate vector correlations for all
pairwise comparisons in my data frame without repeats.  I am familiar with the
expand.grid function, but this includes repeats.  Is there a way to use
expand.grid and eliminate repeats?  Or is there another function that can be
used to do this?
Thank you.
Rebecca
--
Rebecca Young
Graduate Student
Ecology  Evolutionary Biology, Badyaev Lab
University of Arizona
1041 E Lowell
Tucson, AZ 85721-0088
Office: 425BSW
[EMAIL PROTECTED]
(520) 621-4005
__
[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] a little question about R

2004-09-07 Thread John Fox
You can use letters[1:4].
(B
(BI hope that this helps,
(B John 
(B
(B -Original Message-
(B From: [EMAIL PROTECTED] 
(B [mailto:[EMAIL PROTECTED] On Behalf Of ??
(B Sent: Tuesday, September 07, 2004 7:42 PM
(B To: [EMAIL PROTECTED]
(B Subject: [R] a little question about R
(B 
(B Hello,sir: Here's a little question about R which needs your 
(B help.Thanks in advance. 
(B If I wanna make a sequence just like a,b,c,d (In other 
(B words,a vector consists of 4 characters :a,b,c,d ).How can I 
(B do it in a shortcut manner? Yes,I can do it as following: 
(B c("a","b","c","d") and the result is:[1] "a" "b" "c" "d".
(B But I remember there's a shortcut manner to do the same 
(B thing,something like c("a":"d").But the system said:"Error in 
(B "a":"d" : NA/NaN argument" So I wonder the correct method to 
(B do it(I remember the expression is very similar with 
(B c("a":"d")). Thanks from the bottom of my heart. My best regards!
(B
(B
(B__
(B[EMAIL PROTECTED] mailing list
(Bhttps://stat.ethz.ch/mailman/listinfo/r-help
(BPLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] a little question about R

2004-09-07 Thread Roger D. Peng
Try
letters[1:4]
-roger
 wrote:
Hello,sir: Here's a little question about R which needs your help.Thanks in advance. 
If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a b c d.
But I remember there's a shortcut manner to do the same thing,something like 
c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the correct method to do it(I remember the expression is very similar with
c(a:d)). Thanks from the bottom of my heart. My best regards!

__
[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] a little question about R

2004-09-07 Thread Wiener, Matthew
letters[1;4]
LETTERS[1:4] for capitals.

Hope this helps,

Matt Wiener

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, September 07, 2004 8:42 PM
To: [EMAIL PROTECTED]
Subject: [R] a little question about R


Hello,sir: Here's a little question about R which needs your help.Thanks in
advance. 
If I wanna make a sequence just like a,b,c,d (In other words,a vector
consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner?
Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a
b c d.
But I remember there's a shortcut manner to do the same thing,something like

c(a:d).But the system said:Error in a:d : NA/NaN argument So I
wonder the correct method to do it(I remember the expression is very similar
with
c(a:d)). Thanks from the bottom of my heart. My best regards!

__
[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] a little question about R

2004-09-07 Thread Alec Stephenson
letters[1:4]



Alec Stephenson   
Department of Statistics
Macquarie University
NSW 2109, Australia 

  $(AÃÏÐÀ [EMAIL PROTECTED] 09/08/04 10:41am 
Hello,sir: Here's a little question about R which needs your help.Thanks in advance. 
If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 
characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as 
following: c(a,b,c,d) and the result is:[1] a b c d.
But I remember there's a shortcut manner to do the same thing,something like 
c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the 
correct method to do it(I remember the expression is very similar with
c(a:d)). Thanks from the bottom of my heart. My best regards!

__
[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] a little question about R

2004-09-07 Thread Kevin Wang
Hi,

On Wed, 8 Sep 2004, [gb2312] ÃÏÐÀ wrote:

 Hello,sir: Here's a little question about R which needs your help.Thanks in advance.
 If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 
 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as 
 following: c(a,b,c,d) and the result is:[1] a b c d.
 But I remember there's a shortcut manner to do the same thing,something like

How about
  letters[1:4]



Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

__
[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] Thanks

2004-09-07 Thread
Thanks a lot for your timely rely.
I still wonder whether I can use a:d instead of 1:4.
I remember I fulfill it successfully according to the guidance of some materials on 
R,but fail to find it now.
Thanks again!

__
[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] C function name garbled

2004-09-07 Thread Sigal Blay
On Tue, Sep 07, 2004 at 04:57:57PM -0400, Duncan Murdoch wrote:
 On Tue, 7 Sep 2004 12:46:55 -0700, S Blay [EMAIL PROTECTED] wrote :
 
 I wrote an R wrapper function (phylpro) around a C function 
 (Rphylpro).
 The first time I'm running my function, it runs with no errors.
 The second time I'm trying to run it, I get an error message 
 with the first argument to .Call garbled.
 
 Set up:
  dyn.load(Phylpro.so)
  source(phylpro.R)
  WinHalfWidth-30
  permReps-10
  breaks-c(548, 735, 832)
 
 First call to phylpro succeeds:
  b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)
 
 
 Second call to phylpro fails:
  b-phylpro(simulinfile, breaks, WinHalfWidth, permReps)
 Error in .Call(PSg\bBh\b, input_file = 
 as.character(input_file), breaks = as.integer(breaks),  : 
 .Call function name not in load table
 
 Check if my C function name is in load table: 
  is.loaded(Rphylpro)
 [1] TRUE
 
 
 Any ideas?
 
 It looks to me as though your function is doing something to mess up
 R's internal data.  I'd try commenting out the whole body of the
 function, then adding it back gradually to find which part causes the
 trouble.
 
 Duncan Murdoch

I followed your advice - looks like I need some kind of a cast 
when I assign the values of a C vector to an R vector. I think.

Below is an example of something that doesn't work - 
Can someone give me a hand? 
(In the real function, there are also integer and Character 
string C vectors...) 
Thanks.

#include R.h
#include Rdefines.h

SEXP myfunc() {
double *corrs; 
corrs[0]=3.0;
SEXP Rcorrs; 
double *pRcorrs;
PROTECT(Rcorrs = NEW_NUMERIC(1));
pRcorrs = NUMERIC_POINTER(Rcorrs);
pRcorrs[0] = corrs[0];

UNPROTECT(1); 
return(R_NilValue);
}

/*
 dyn.load(myfunc.so)
 func-function().Call(myfunc)
 func()
*/

Run it once, it's ok:
  func() 
NULL

Run it twice, not ok:
  func() 
Error in .Call(NULL) : function name must be a string (of length 1)

__
[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] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-07 Thread Jason Liao
Hello, everyone! I guess no one is still using R on Sun Sparc these
days. But our department has a (pretty new) two-CPU Sun server. We
recently compiled R as a 64 bit application and expected a performance
boost. But it runs 25-30% slower than the 32 bit version of R. Anyone
knows why this is so? Thanks!

Jason


=
Jason Liao, http://www.geocities.com/jg_liao
Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb
University of Medicine and Dentistry of New Jersey
phone 732-235-5429, School of Public Health office
phone 732-235-8611, Cancer Institute of New Jersey office
moble phone 908-720-4205

__
[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] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-07 Thread Roger D. Peng
Are you using an optimized BLAS for both builds?  That's one possibility.  Also, 
64-bit builds use up more memory initially since the pointers are bigger.  I've 
tried both 64-bit and 32-bit builds on Sparc/Solaris and haven't seen any slowdown.

-roger
Jason Liao wrote:
Hello, everyone! I guess no one is still using R on Sun Sparc these
days. But our department has a (pretty new) two-CPU Sun server. We
recently compiled R as a 64 bit application and expected a performance
boost. But it runs 25-30% slower than the 32 bit version of R. Anyone
knows why this is so? Thanks!
Jason
=
Jason Liao, http://www.geocities.com/jg_liao
Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb
University of Medicine and Dentistry of New Jersey
phone 732-235-5429, School of Public Health office
phone 732-235-8611, Cancer Institute of New Jersey office
moble phone 908-720-4205
__
[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


[R] download of 1.9.1

2004-09-07 Thread Kathy DeRiemer
Hi there,
I downloaded version 1.9.1 WinZip file, 9.367 bytes ( so I can update my R 
and use the vcd package) but cannot get the download from your Web site to 
unzip and install.  So silly!

The error message is : Error reading header after processing 0 
entries.  I tried downloading from 3 different URLs, all yielding the same 
message when I try to unzip and install the file.

Could you please let me know what the problem is, including operator error 
on my end.  Thank you

__
[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] download of 1.9.1

2004-09-07 Thread Kevin Wang
Hi,

On Tue, 7 Sep 2004, Kathy DeRiemer wrote:

 Hi there,

 I downloaded version 1.9.1 WinZip file, 9.367 bytes ( so I can update my R

Uit doesn't sound right, 9 bytes

 and use the vcd package) but cannot get the download from your Web site to
 unzip and install.  So silly!

 The error message is : Error reading header after processing 0
 entries.  I tried downloading from 3 different URLs, all yielding the same
 message when I try to unzip and install the file.

Well, since you mentioned WinZip I'm assuming you are using R under
Windows.  IN which case why don't you update the package from Rgui using
the menu?  See the FAQ...

Cheers,

Kevin


Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

__
[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] Thanks

2004-09-07 Thread Gabor Grothendieck
 xmeng at capitalbio.com writes:

: Thanks a lot for your timely rely.
: I still wonder whether I can use a:d instead of 1:4.
: I remember I fulfill it successfully according to the guidance of some 
materials on R,but fail to find it now.

You could define your own seq function and operator:

R %:% - seq.character - function(x,y) letters[letters = x  letters = y]
R seq(a, d)
[1] a b c d
R a %:% d
[1] a b c d

__
[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] Thanks

2004-09-07 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes:

: 
:  xmeng at capitalbio.com writes:
: 
: : Thanks a lot for your timely rely.
: : I still wonder whether I can use a:d instead of 1:4.
: : I remember I fulfill it successfully according to the guidance of some 
: materials on R,but fail to find it now.
: 
: You could define your own seq function and operator:
: 
: R %:% - seq.character - function(x,y) letters[letters = x  letters = 
y]
: R seq(a, d)
: [1] a b c d
: R a %:% d
: [1] a b c d

And just as a follow up to my own post, if you want to make this a bit more
general you might use ascii in place of letters where ascii is defined in:

http://www.r-project.org/nocvs/mail/r-help/2002/0952.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] Thanks

2004-09-07 Thread Liaw, Andy
A small drawback to Gabor's proposal:
(B
(B "aa" %:% "dd"
(B[1] "b" "c" "d"
(B "00" %:% "99"
(Bcharacter(0)
(B
(BDefining it as a seq() method for characters is probably not a terribly good
(Bidea, as one should expect it to work for any character vectors as input.
(B(One can argue that the function worked as `expected', I suppose...)
(B
(BBest,
(BAndy
(B
(B From: Gabor Grothendieck
(B 
(B $BLR6U(J xmeng at capitalbio.com writes:
(B 
(B : Thanks a lot for your timely rely.
(B : I still wonder whether I can use "a":"d" instead of 1:4.
(B : I remember I fulfill it successfully according to the 
(B guidance of some 
(B materials on R,but fail to find it now.
(B 
(B You could define your own seq function and operator:
(B 
(B R "%:%" - seq.character - function(x,y) letters[letters = 
(B x  letters = y]
(B R seq("a", "d")
(B [1] "a" "b" "c" "d"
(B R "a" %:% "d"
(B [1] "a" "b" "c" "d"
(B 
(B __
(B [EMAIL PROTECTED] mailing list
(B https://stat.ethz.ch/mailman/listinfo/r-help
(B PLEASE do read the posting guide! 
(B http://www.R-project.org/posting-guide.html
(B 
(B
(B
(B__
(B[EMAIL PROTECTED] mailing list
(Bhttps://stat.ethz.ch/mailman/listinfo/r-help
(BPLEASE do read the posting guide! http://www.R-project.org/posting-guide.html