Re: [R] help with lme()

2003-11-05 Thread Pascal A. Niklaus
As far as I understand it, the problem is that REML accounts for the 
degrees of freedom used up by fixed effects (e.g., treatments), whereas 
ML does not account for these. From that perspective, REML appears to be 
the better fitting method.

However, if you test for a fixed effect by comparing two models, one 
including the fixed effect and one lacking it but otherwise identical, 
then the model comparison anova(model1,model2) is invalid when you use 
REML (because there is a different number of df consumed by the fixed 
effects in model1 and model2), but it is valid if you use ML (because it 
does not account for the df used up by the fixed effects at all).

Pascal

Bill Shipley wrote:

Hello. I am trying to determine whether I should be using ML or REML
methods to estimate a linear mixed model.   In the book by Pinheiro 
Bates (Mixed-effects models in S and S-PLUS, page 76) they state that
one difference between REML and ML is that  LME models with different
fixed-effects structures fit using REML cannot be compared on the basis
of their restricted likelihoods.  In particular, likelihood ratio tests
are not valid under these circumstances.
I am not sure what fixed-effects structures means.  Does it mean that,
as long as the types of contrasts are the same between two models, they
ARE comparable, but are NOT comparable if the types of contrasts are
changes?  Or rather, does it simply mean that one should use t or F
tests for the fixed effects, and restrict the likelihood ratio tests to
the random effects only if using REML?


Bill Shipley

Associate Editor, Ecology

North American Editor, Annals of Botany

Dpartement de biologie, Universit de Sherbrooke,

Sherbrooke (Qubec) J1K 2R1 CANADA

[EMAIL PROTECTED]

http://callisto.si.usherb.ca:8080/bshipley/
http://callisto.si.usherb.ca:8080/bshipley/


	[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] converting column to factor *within* a data frame

2003-11-05 Thread Pascal A. Niklaus
Hi all,

I repeatedly encounter the following problem: After importing a data set 
into a data frame, I wish to set a column with numeric values to be a 
factor, but can't figure out how to do this. Also, I do not wish to 
write as.factor(x) all the time. I can create a new vector with x - 
factor(x), but the new vector resides outside the attached data frame.

Pascal

 attach(ngrad)
 is.factor(STNW)
[1] FALSE
 ngrad$STNW-factor(STNW)  ## doesn't work
 is.factor(STNW)
[1] FALSE
 is.factor(STNW) - T## doesn't work either
Error: couldn't find function is.factor-
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] converting column to factor *within* a data frame

2003-11-05 Thread Prof Brian Ripley
On Wed, 5 Nov 2003, Pascal A. Niklaus wrote:

 Hi all,
 
 I repeatedly encounter the following problem: After importing a data set 
 into a data frame, I wish to set a column with numeric values to be a 
 factor, but can't figure out how to do this. Also, I do not wish to 
 write as.factor(x) all the time. I can create a new vector with x - 
 factor(x), but the new vector resides outside the attached data frame.
 
 Pascal
 
   attach(ngrad)
   is.factor(STNW)
 [1] FALSE
 
   ngrad$STNW-factor(STNW)  ## doesn't work
   is.factor(STNW)
 [1] FALSE

It does work.  It changes ngrad, and not the copy you attached.

ngrad$STNW-factor(ngrad$STNW)
attach(ngrad)

is the correct sequence.

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] converting column to factor *within* a data frame

2003-11-05 Thread Simon Fear
Your problem is with scoping, not the conversion per se:

   attach(ngrad)
   is.factor(STNW)
 [1] FALSE

At this moment, STNW is the same as ngrad$STNW

   ngrad$STNW-factor(STNW)  ## doesn't work

Yes it does work, try looking at is.factor(ngrad$STNW)

   is.factor(STNW)
 [1] FALSE

After you assign to ngrad$STNW, it is no longer the same
thing as the attached STNW. You would need to detach
and re-attach ngrad for this to be so. There's no
automatic synchronisation between the attached STNW 
and ngrad$STNW; changing one will not change the other.

My advice is: never use attach() if you can help it. It's an 
accident waiting to happen. Get used to typing
dataFrame$varname instead of just varname - that way
you will always get what you expect. Or use with() instead 
of attach() in almost every case. 

HTH  
 
Simon Fear 
Senior Statistician 
Syne qua non Ltd 
Tel: +44 (0) 1379 69 
Fax: +44 (0) 1379 65 
email: [EMAIL PROTECTED] 
web: http://www.synequanon.com 
  
Number of attachments included with this message: 0 
  
This message (and any associated files) is confidential and\...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] objects inside curly braces

2003-11-05 Thread Patrick Burns
See also:

?recover
?debugger

Patrick Burns

Burns Statistics
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S User)

Duncan Murdoch wrote:

On Tue, 4 Nov 2003 16:19:44 -0800 , you wrote:

  

Hello,

I am running a program in r that calls a function, which calls another
function, which calls another etc. These functions are of the form:

example- function(x,y,z)

{x, y, and z are defined within curly braces like this}

Here's my question. To start the main function, I input as an initial
parameter a matrix of regressors of the form:

MyMatrix-cbind(this.one,that.one)

That's all fine, but then I get a nonconformability message telling me that
MyMatrix is not conformable with x. 

I can check the dimensions of MyMatrix, but x is in curly braces, and so is
not an object. I'd like to check the dimensions of x, but can't, so it's
hard to tell what's wrong with it.

Any suggestions?



The objects within the braces are called local variables; in most
cases they exist only for the life of the function call.

To debug them, use debug().  For example, if the function that's not
working is called foo, then do this:

debug(foo)
foo(x, y, z)

This will let you single step through the code in foo, and see what's
going on.  See ?debug for details.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


  



[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Fitting a 3-parameter gammadistribution

2003-11-05 Thread Mårten Bjellerup
I have 'grouped' data, that is in the form of:

IntervalMedian
0-9.9%:-25
10-19.9%: 0
20-29.9%: 3
30-39.9%: 10
40-49.9%: 50
50-59.9%: 200
et cetera

and want to fit a three parameter gamma distribution. Does anyone know of an existing 
routine for doing this (or something similar)? Any help or comment is much appreciated.

Regards,

Mårten

Mårten Bjellerup
Doctoral Student in Economics
School of Management and Economics
Växjö University
SE-351 95  Växjö
Sweden

Tel: +46 470 708410 
Fax: +46 470 82478 
Mobile: +46 70 969 88 88 
Mail: [EMAIL PROTECTED] 
Web: http://www.ehv.vxu.se
-
Forecasting is like trying to
drive a car blindfolded and
following directions given 
by a person who is looking
out of the back window

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] USA map

2003-11-05 Thread Mathieu Ros
 k == kjetil  [EMAIL PROTECTED] disait:

 snip
k I also tried

k map(worldHires,sweden)
k map(worldHires,denmark) # which comes out very small since it
k  # includes the Faroe 
k  # islands properly faraway

and, just to know, how would you do to plot *only* continental
denmark? The same applies for france, UK, ...

-- 
Mathieu Ros
Ph. D. student - Canalizing selection using Bayesian models
INRA - Fish Genetics Unit (Paris)/Cell Genetics Unit (Toulouse)
tel : (+0033)1 3465 3414 (FGU) / (+0033)5 6128 5305 (CGU)
mail : [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] USA map

2003-11-05 Thread Ivar Herfindal
On Wed,  5 Nov 2003 11:28:42 +0100 (MET), Mathieu Ros 
[EMAIL PROTECTED] wrote:

k == kjetil  [EMAIL PROTECTED] disait:
snip
k I also tried
k map(worldHires,sweden)
k map(worldHires,denmark) # which comes out very small since it
k  # includes the Faroe k   
# islands properly faraway

and, just to know, how would you do to plot *only* continental
denmark? The same applies for france, UK, ...
Hello

One simple way of doing it is to specify the xlim and ylim of your map, 
e.g. library(maps)
map('world', 'Norway', xlim=c(5, 33), ylim=c(55, 75))

btw. the reason why Norway comes out so small when writing only

map('world', 'Norway')

is due to the Bouvet Island, located south (54 degrees south) in the 
Atlantic Ocean.

Ivar Herfindal

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] map does not display maps, MacOSX

2003-11-05 Thread Philippe Glaziou
Hi,

I installed the maps and mapdata libraries on my R-1.8.0 on
MacOSX 10.2.8 (jaguar on a powerbook G4), and failed to make the
map function work properly:


R : Copyright 2003, The R Development Core Team
Version 1.8.0  (2003-10-08)
[...]

 library(maps)
 map()
Error in file(file, r) : unable to open connection
In addition: Warning message: 
cannot open file `/Users/glaziou/Library/R/maps/mapdata//world.N' 
 map('usa')
Error in file(file, r) : unable to open connection
In addition: Warning message: 
cannot open file `/Users/glaziou/Library/R/maps/mapdata//usa.N' 
 system('ls -l /Users/glaziou/Library/R/maps/mapdata')
total 1796
-rw-r--r--   1 root staff  143902 Oct 14 11:30 county.G
-rw-r--r--   1 root staff  690260 Oct 14 11:30 county.L
-rw-r--r--   1 root staff 618 Oct 14 11:30 nz.G
-rw-r--r--   1 root staff   13040 Oct 14 11:30 nz.L
-rw-r--r--   1 root staff2642 Oct 14 11:30 state.G
-rw-r--r--   1 root staff   96892 Oct 14 11:30 state.L
-rw-r--r--   1 root staff 282 Oct 14 11:30 usa.G
-rw-r--r--   1 root staff   58232 Oct 14 11:30 usa.L
-rw-r--r--   1 root staff   74434 Oct 14 11:30 world.G
-rw-r--r--   1 root staff  295152 Oct 14 11:30 world.L
-rw-r--r--   1 root staff   74434 Oct 14 11:30 world2.G
-rw-r--r--   1 root staff  295152 Oct 14 11:30 world2.L
-rw-r--r--   1 root staff   54832 Oct 14 11:30 world2.N

Most of contributed libraries are installed in ~/Library/R
because I am the only user of that mac and this simplifies
backup. I checked the access rights of relevant files and
directories and they all seem correct (these are owned by root
but are world readable and directories are world cd'able).
Compilation of both libraries maps and mapdata went ok.  I have
the same libraries installed on a linux server where they work
perfectly well. 

A similar error message occurs whether R is started in an xterm,
within emacs/ESS on X11, or using the RAqua interface.

Any hint appreciated,

-- 
Philippe Glaziou

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] map does not display maps, MacOSX

2003-11-05 Thread Prof Brian D Ripley
Notice the // in the path

/Users/glaziou/Library/R/maps/mapdata//world.N

Some Windows filesystems do not like that, and my guess is that some MacOS
X ones may not either.

On Wed, 5 Nov 2003, Philippe Glaziou wrote:

 Hi,

 I installed the maps and mapdata libraries on my R-1.8.0 on
 MacOSX 10.2.8 (jaguar on a powerbook G4), and failed to make the
 map function work properly:


 R : Copyright 2003, The R Development Core Team
 Version 1.8.0  (2003-10-08)
 [...]

  library(maps)
  map()
 Error in file(file, r) : unable to open connection
 In addition: Warning message:
 cannot open file `/Users/glaziou/Library/R/maps/mapdata//world.N'
  map('usa')
 Error in file(file, r) : unable to open connection
 In addition: Warning message:
 cannot open file `/Users/glaziou/Library/R/maps/mapdata//usa.N'
  system('ls -l /Users/glaziou/Library/R/maps/mapdata')
 total 1796
 -rw-r--r--   1 root staff  143902 Oct 14 11:30 county.G
 -rw-r--r--   1 root staff  690260 Oct 14 11:30 county.L
 -rw-r--r--   1 root staff 618 Oct 14 11:30 nz.G
 -rw-r--r--   1 root staff   13040 Oct 14 11:30 nz.L
 -rw-r--r--   1 root staff2642 Oct 14 11:30 state.G
 -rw-r--r--   1 root staff   96892 Oct 14 11:30 state.L
 -rw-r--r--   1 root staff 282 Oct 14 11:30 usa.G
 -rw-r--r--   1 root staff   58232 Oct 14 11:30 usa.L
 -rw-r--r--   1 root staff   74434 Oct 14 11:30 world.G
 -rw-r--r--   1 root staff  295152 Oct 14 11:30 world.L
 -rw-r--r--   1 root staff   74434 Oct 14 11:30 world2.G
 -rw-r--r--   1 root staff  295152 Oct 14 11:30 world2.L
 -rw-r--r--   1 root staff   54832 Oct 14 11:30 world2.N

 Most of contributed libraries are installed in ~/Library/R
 because I am the only user of that mac and this simplifies
 backup. I checked the access rights of relevant files and
 directories and they all seem correct (these are owned by root
 but are world readable and directories are world cd'able).
 Compilation of both libraries maps and mapdata went ok.  I have
 the same libraries installed on a linux server where they work
 perfectly well.

 A similar error message occurs whether R is started in an xterm,
 within emacs/ESS on X11, or using the RAqua interface.

 Any hint appreciated,

 --
 Philippe Glaziou

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help



-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Match data.frames with different number of rows

2003-11-05 Thread Bernd Weiss
Dear all,

I have two data.frames a and b:

i - c(1,1,2,2,3,3,4,4)
x - c(1,53,7,3,4,23,6,2)
a - data.frame(i,x)

and 

j - c(1,2,3,4)
y - c(99,88,77,66)
b - data.frame(j,y)

So, a looks like this

 a
  i  x
 1  1
 1 53
 2  7
 2  3
 3  4
 3 23
 4  6
 4  2

and b like this

 b
  j  y
 1 99
 2 88
 3 77
 4 66

Now, I would like to match 'b' to 'a', so that a new data.frame 'c' is

 c
  i  x  z
1 1  1  99
2 1 53  99
3 2  7  88  
4 2  3  88
5 3  4  77  
6 3 23  77
7 4  6  66
8 4  2  66

I habe absolutely no idea how to do this. I searched the net, the FAQ, the manuals, my 
four books...

Any help would be appreciated!

Bernd

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Fitting a 3-parameter gammadistribution

2003-11-05 Thread Spencer Graves
 That's called interval censoring.  The likelihood for such 
cases is the probability of what was observed, i.e., (pgamma3(10, ..., - 
pgamma3(0, ...))*... .  For this kind of problem, I have in the past 
written a function to compute the log(likelihood) and then passed that 
function to optim. 

 hope this helps.  spencer graves

Mårten Bjellerup wrote:

I have 'grouped' data, that is in the form of:

IntervalMedian
0-9.9%:-25
10-19.9%: 0
20-29.9%: 3
30-39.9%: 10
40-49.9%: 50
50-59.9%: 200
et cetera
and want to fit a three parameter gamma distribution. Does anyone know of an existing routine for doing this (or something similar)? Any help or comment is much appreciated.

Regards,

Mårten

Mårten Bjellerup
Doctoral Student in Economics
School of Management and Economics
Växjö University
SE-351 95  Växjö
Sweden
Tel: +46 470 708410 
Fax: +46 470 82478 
Mobile: +46 70 969 88 88 
Mail: [EMAIL PROTECTED] 
Web: http://www.ehv.vxu.se
-
Forecasting is like trying to
drive a car blindfolded and
following directions given 
by a person who is looking
out of the back window

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Match data.frames with different number of rows

2003-11-05 Thread Philippe Glaziou
Bernd Weiss [EMAIL PROTECTED] wrote:
 I have two data.frames a and b:
 
 i - c(1,1,2,2,3,3,4,4)
 x - c(1,53,7,3,4,23,6,2)
 a - data.frame(i,x)
 
 and 
 
 j - c(1,2,3,4)
 y - c(99,88,77,66)
 b - data.frame(j,y)
 
 Now, I would like to match 'b' to 'a', so that a new data.frame 'c' is
 
  c
   i  xz
 1 1  199
 2 1 5399
 3 2  788  
 4 2  388
 5 3  477  
 6 3 2377
 7 4  666
 8 4  266


Merge should do the job:

 merge(a,b,by=1) 
  i  x  y
1 1  1 99
2 1 53 99
3 2  7 88
4 2  3 88
5 3  4 77
6 3 23 77
7 4  6 66
8 4  2 66


--
Philippe Glaziou

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: RE: [R] Cointegration

2003-11-05 Thread Adrian Trapletti


In tseries, look for ?adf.test  ?pp.test.

These are standard unit-root tests and can only be used to test for 
cointegration indirectly. And then the critical values have to be 
adapted. A direct test for cointegration is po.test from tseries.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erin Hodgess
Sent: Wednesday, November 05, 2003 8:20 AM
To: [EMAIL PROTECTED]
Subject: [R] Cointegration
Do any packages exist for cointegration, please?

No. However, it is pretty simple to implement the Engle-Granger two-step 
procedure by using lm, embed, and maybe arima, together with one of the 
mentioned tests.

Do we need them, if the answer to the previous is no, please?

It would be nice to have one, sure. In particular, the Johansen procedures.

Thanks,
Erin
mailto: [EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
best
Adrian
--
Dr. Adrian Trapletti
Trapletti Statistical Computing
Wildsbergstrasse 31, 8610 Uster
Switzerland
Phone  Fax : +41 (0) 1 994 5631
Mobile : +41 (0) 76 370 5631
Email : mailto:[EMAIL PROTECTED]
WWW : http://trapletti.homelinux.com
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] map does not display maps, MacOSX

2003-11-05 Thread Philippe Glaziou
Prof Brian D Ripley [EMAIL PROTECTED] wrote:
 Notice the // in the path
 
 /Users/glaziou/Library/R/maps/mapdata//world.N
 
 Some Windows filesystems do not like that, and my guess is that
 some MacOS X ones may not either.


I noticed that.  However, this does not to seem to bother MacOSX
too much (R internals on MacOSX may not like it):

madeleine:~ pwd
/Users/glaziou
madeleine:~ ls Library/R//maps//mapdata
county.G  nz.G  state.G  usa.G  world.G  world2.G  world2.N
county.L  nz.L  state.L  usa.L  world.L  world2.L
madeleine:~ cd Library///R/maps//mapdata
madeleine:~/Library/R/maps/mapdata pwd
/Users/glaziou/Library/R/maps/mapdata

--
Philippe

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] more barplot presentation questions

2003-11-05 Thread Gavin Simpson
Hi Paul,

for the first question try ?grid

as in:

 barplot(1:10)
 grid(nx = NA, ny = NULL, col = red)
nx = NA sets no lines on x-axis. ny = NULL draws lines from all tick 
marks on the y-axis.

HTH

Gav

Paul Sorenson wrote:

Thanks to those who pointed me at the solutions to the legend
overprinting the bars.  I took the easy way of rescaling the y
axis, picking the scaling factor for stacked bars is somewhat
problematic but sufficient for my application.
I have another couple of barplot questions:

- Can I extend the major ticks on the Y axis across the page?  Or
both axes to form a grid?
- A really neat graph for me would be a combination of side-by-side
and stacked bars in a single plot to display an additional category.
The background on the second problem is that I am displaying software
defect metrics.  For each month (the bins) the categories of interest
are: - new/fixed/closed - numeric severity (1 - 5)
I am currently displaying 5 separate graphs (6 when you take the
aggregate into account) with new/fixed/closed side-by-side.  If
within the side-by-side graphs I could show the severity stacked that
would be very neat.
Cheers

__ 
[EMAIL PROTECTED] mailing list 
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Ignoring Errors in Simulations

2003-11-05 Thread Ken Kelley
Hello all.

I'm doing a simulation study and every so often I get an error that stops 
the simulation. I would like to ignore the errors *and* identify the 
particular iterations where they occurred. I have tried:

options(error = expression(NULL))

which I thought would ignore the error, but the simulation is still stopped 
when an error occurs. I do not think try() is a good idea because of the 
significant computational time (that I think) it would add.

Specifically I am using factanal() from the mva library and the error is:

Error in factanal(Data, factors = 1, rotation = none) :
Unable to optimize from these starting value(s)
-I am using R 1.7.1 on a Windows XP machine.
Although increasing the number of starting values attempted would reduces 
the number or errors, I'm looking for a way that they are ignored and these 
(likely) untrustworthy results identified.
Thanks for any thoughts,
Ken

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Re: R-help Digest, Vol 9, Issue 5

2003-11-05 Thread Michal Bojanowski
Hello r-help-request,

I'm an email assistant of Mr Micha Bojanowski.

On Wednesday, November 5, 2003, 12:13:12 PM, you emailed Mr Bojanowski
using address [EMAIL PROTECTED] Unfortunately for you this
address is no longer used by Mr Micha Bojanowski for his private
correspondence. If, nevertheless, you insist on contacting
Mr Bojanowski, please do it by other means of communication.

=

Witam r-help-request,

Jestem asystentk Pana Michaa Bojanowskiego d/s
obsugi poczty email.

Dnia 5 listopada 2003, 14:40:41, napisa(a) Pan(i) email do Pana Bojanowskiego
uywajc adresu [EMAIL PROTECTED] Niestety Pan Bojanowski
nie korzysta ju z tego adresu dla swojej prywatnej korespondencji.
Jeeli zaley Pan(i) na skontaktowaniu si mimo to z Panem Bojanowskim
prosz to uczyni za pomoc innych adresw, rodkw komunikacji.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Ignoring Errors in Simulations

2003-11-05 Thread Thomas W Blackwell
Ken  -

Either test each simulated data set explicitly for the
condition which causes  factanal() to fail (perhaps rank
deficiency ?), or else use  try().  Which is quicker,
using  try() or restarting your simulation from the
beginning each time there's a failure ?

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Wed, 5 Nov 2003, Ken Kelley wrote:

 Hello all.

 I'm doing a simulation study and every so often I get an error that stops
 the simulation. I would like to ignore the errors *and* identify the
 particular iterations where they occurred. I have tried:

 options(error = expression(NULL))

 which I thought would ignore the error, but the simulation is still stopped
 when an error occurs. I do not think try() is a good idea because of the
 significant computational time (that I think) it would add.

 Specifically I am using factanal() from the mva library and the error is:

 Error in factanal(Data, factors = 1, rotation = none) :
   Unable to optimize from these starting value(s)
 -I am using R 1.7.1 on a Windows XP machine.

 Although increasing the number of starting values attempted would reduces
 the number or errors, I'm looking for a way that they are ignored and these
 (likely) untrustworthy results identified.
 Thanks for any thoughts,
 Ken

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] matching of arguments in ...?

2003-11-05 Thread David Firth
I am puzzled by this (with R --vanilla):

   test - function(formula, ...) lm(formula, ...)
   test(1:4 ~ 1, offset=rep(1,4))
  Error in eval(expr, envir, enclos) : ..1 used in an incorrect 
context, no ... to look in
test(1:4 ~ 1, weights=rep(1,4))
  Error in eval(expr, envir, enclos) : ..1 used in an incorrect 
context, no ... to look in
test(1:4 ~ 1, x=TRUE)

  Call:
  lm(formula = formula, x = TRUE)
  Coefficients:
  (Intercept)
  2.5
Some arguments (such as x) seem to pass willingly through ..., while 
others (such as offset and weights) do not.  Same thing happens with 
glm.  I haven't experimented more widely.

Can some kind soul offer an explanation?

Thanks,
David
 version
 _
platform powerpc-apple-darwin6.7.5
arch powerpc
os   darwin6.7.5
system   powerpc, darwin6.7.5
status
major1
minor8.0
year 2003
month10
day  08
language R
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] question

2003-11-05 Thread Fuensanta Saura Igual


Dear all,

I was wondering if someone could tell me what function I must use to know how
long a computing problem has taken using R, I mean, I want to know the amount 
of time R has need to compute some certain task that has developed.

Could anyone answer this?

Thanks

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Ignoring Errors in Simulations

2003-11-05 Thread Sean O'Riordain
?try



Ken Kelley wrote:
Hello all.

I'm doing a simulation study and every so often I get an error that 
stops the simulation. I would like to ignore the errors *and* identify 
the particular iterations where they occurred. I have tried:

options(error = expression(NULL))

which I thought would ignore the error, but the simulation is still 
stopped when an error occurs. I do not think try() is a good idea 
because of the significant computational time (that I think) it would add.

Specifically I am using factanal() from the mva library and the error is:

Error in factanal(Data, factors = 1, rotation = none) :
Unable to optimize from these starting value(s)
-I am using R 1.7.1 on a Windows XP machine.
Although increasing the number of starting values attempted would 
reduces the number or errors, I'm looking for a way that they are 
ignored and these (likely) untrustworthy results identified.
Thanks for any thoughts,
Ken

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] question

2003-11-05 Thread Marc Schwartz
On Wed, 2003-11-05 at 08:03, Fuensanta Saura Igual wrote:
 Dear all,
 
 I was wondering if someone could tell me what function I must use to know how
 long a computing problem has taken using R, I mean, I want to know the amount 
 of time R has need to compute some certain task that has developed.
 
 Could anyone answer this?
 
 Thanks


See ?system.time

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Ignoring Errors in Simulations

2003-11-05 Thread Prof Brian Ripley
On Wed, 5 Nov 2003, Ken Kelley wrote:

 I'm doing a simulation study and every so often I get an error that stops 
 the simulation. I would like to ignore the errors *and* identify the 
 particular iterations where they occurred. I have tried:
 
 options(error = expression(NULL))
 
 which I thought would ignore the error, but the simulation is still stopped 
 when an error occurs. I do not think try() is a good idea because of the 
 significant computational time (that I think) it would add.

There is no significant extra computational time.  Why do you think there 
would be?  And if there were, why would this be recommended on the help 
page for try?


-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Mean Significance

2003-11-05 Thread Igor Roytberg
Hello,

If you determine the means of x treatments and see that one is larger than the others, 
can you use a sample normal to determine how statistically significant the difference 
is? or would contrasts by a better tool? How would one go about to do this in R?

Thanks for any help (since R is new to me),

Igor

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] matching of arguments in ...?

2003-11-05 Thread Thomas Lumley
On Wed, 5 Nov 2003, David Firth wrote:

 I am puzzled by this (with R --vanilla):

 test - function(formula, ...) lm(formula, ...)
 test(1:4 ~ 1, offset=rep(1,4))
Error in eval(expr, envir, enclos) : ..1 used in an incorrect
 context, no ... to look in
  test(1:4 ~ 1, weights=rep(1,4))
Error in eval(expr, envir, enclos) : ..1 used in an incorrect
 context, no ... to look in
  test(1:4 ~ 1, x=TRUE)

Call:
lm(formula = formula, x = TRUE)

Coefficients:
(Intercept)
2.5

 Some arguments (such as x) seem to pass willingly through ..., while
 others (such as offset and weights) do not.  Same thing happens with
 glm.  I haven't experimented more widely.

 Can some kind soul offer an explanation?

This is a historical legacy of someone trying to be too helpful.

In lm() and similar functions there are some arguments that are
interpreted as if they were quoted expressions and then are looked up in
data= and in the calling frame (actually in environment(formulas)).

So

 lm(y~x, offset=z, data=df)

will work if z is either a column of df or a variable floating free in the
calling frame.

In order to make this rather unnatural evaluation work, lm and model.frame
have to play tricks with these arguments: they are explicitly evaluated in
environment(formula), in this case the environment inside test().

This sort of thing is why some of us strongly recommend not having
implicit dynamic scoping on new modelling functions, so eg in the survey
package the syntax looks like
  svydesign(id=~id, weights=~w, data=df)
with explicit formulas.  The other option is explicitly quoted
expressions.


-thomas

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-05 Thread David Brahm
Neil Osborne [EMAIL PROTECTED] wrote:
 Is any one aware of R help documentation that is aranged in functional
 categories for e.g.:
   String manipulation
   File I/O
   Dataframe, List manipulation

There really oughta be.  Several people replied with ways to search the help,
but that assumes you know the specific task you want to perform, and the right
keyword to describe it.  Beginners often just want to learn what's available.

For a few functional categories there are general help pages, and you might
not easily stumble across them.  Here's a list I came up with recently.  Just
type e.g. ?Arithmetic at the R prompt to learn about Arithmetic Operators.

?Arithmetic
?Comparison
?Control
?DateTimeClasses
?Defunct
?Deprecated
?Devices
?Extract (same as ?Subscript)
?Foreign
?Logic
?Memory
?Paren
?Rdconv  (RdUtils page: Rdconv, Rd2dvi, Rd2txt, Sd2Rd)
?Special (beta, gamma, choose, ...)
?Startup
?Syntax
?build   (PkgUtils page: R CMD build, R cmd check)
?connections (file, pipe, ...)
?pi  (Constants page: LETTERS, letters, month.abb, month.name, pi)

-- 
  -- David Brahm ([EMAIL PROTECTED])

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-05 Thread Prof Brian Ripley
On Wed, 5 Nov 2003, David Brahm wrote:

 Neil Osborne [EMAIL PROTECTED] wrote:
  Is any one aware of R help documentation that is aranged in functional
  categories for e.g.:
String manipulation
File I/O
Dataframe, List manipulation
 
 There really oughta be.  Several people replied with ways to search the
 help, but that assumes you know the specific task you want to perform,
 and the right keyword to describe it.  Beginners often just want to
 learn what's available.

Well, as described in your quotation you need to know the `functional
categories' and help.start's search page does list the known `functional
categories' and will list under each one. So there really IS, not `oughta 
be',

Similarly help.search can list by categories, aka keywords.  Perhaps its 
help page needs to say where the list of standard keywords is.

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Jens Oehlschlägel

I need to write out with write.table() a csv file allowing for line feeds
(pure chr(10)) as part of character field (not as a line seperator).

How can I do that?

Best regards


Jens Oehlschlägel

--

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Mean Significance

2003-11-05 Thread Prof Brian Ripley
This is a multiple comparisons problem, so no.  You need to use TukeyHSD 
or the multcomp package.  You can test contrasts via t-tests only if you 
select they before looking at the data.

Time to consult a good book on the subject?

On Wed, 5 Nov 2003, Igor Roytberg wrote:

 If you determine the means of x treatments and see that one is larger
 than the others, can you use a sample normal to determine how
 statistically significant the difference is? or would contrasts by a
 better tool? How would one go about to do this in R?
 
 Thanks for any help (since R is new to me),

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] package installation problems

2003-11-05 Thread Prof Brian Ripley
PLEASE do read the documentation.  See rw-FAQ Q3.1.

On Wed, 5 Nov 2003, allan clark wrote:

 I have tried to install some of the packages from the CRAN packages
 section.
 
 I am running  a windows system.
 
 I did the following: (for example...)
 
1.downloaded the zip file (mgcv_0.9-5.tar) from
 http://cran.r-project.org/src/contrib/PACKAGES.html#sm

That is not a zip file, and you seem to be confusing mgcv and sm: mgcv 
comes with R so you don't need to install it (although you may now need to 
reinstall R).

2.and saved it in the library folder of R
3.unzipped the file into the same folder
4.a folder named sm was created
5.from within R I loaded the package by using library(mgcv)
 
 Any help would be much appreciated.

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] package installation problems

2003-11-05 Thread Uwe Ligges
allan clark wrote:
Hi

I have tried to install some of the packages from the CRAN packages
section.


This is a FAQ. See the R for Windows FAQs, Section 3.1: Can I install 
packages (libraries) in this version?

BTW: Simply typing
  install.packages(mgcv)
should do the trick.
Uwe Ligges


I am running  a windows system.

I did the following: (for example...)

   1.downloaded the zip file (mgcv_0.9-5.tar) from
http://cran.r-project.org/src/contrib/PACKAGES.html#sm
   2.and saved it in the library folder of R
   3.unzipped the file into the same folder
   4.a folder named sm was created
   5.from within R I loaded the package by using library(mgcv)
Any help would be much appreciated.



__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] package installation problems

2003-11-05 Thread Marc Schwartz
On Wed, 2003-11-05 at 09:45, allan clark wrote:
 Hi
 
 I have tried to install some of the packages from the CRAN packages
 section.
 
 I am running  a windows system.
 
 I did the following: (for example...)
 
1.downloaded the zip file (mgcv_0.9-5.tar) from


A .tar file is not a ZIP file. It is a Unix/Linux archive file format. 

Please read Windows FAQ 3.1 on installing packages under Windows.

http://cran.r-project.org/bin/windows/rw-FAQ.html

There are several ways to install CRAN packages within the Windows GUI,
either via menus or the command line, described there.

If you should elect to download the .zip file directly from CRAN at:

http://cran.r-project.org/bin/windows/contrib/

be sure that you are in the proper R version specific directory for the
Contributed packages. You can then use the RGui menu option to install
from a local zip file.

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] editor argument in edit()

2003-11-05 Thread Tito de Morais Luis
Hi dear listers,

In R 1.7 under linux, if I try to edit a vector, it can be edit using
any editor:
z- c(1,2,3,4)
edit(z) #opens vi
edit(z, editor=gnumeric) #opens z in gnumeric
edit(z, editor=gedit) #opens z in gedit

It is similar in Windows98 (R 1.8) :

edit(z) #opens z in notepad
edit(z, editor=C:\\Program Files\\Microsoft Office\\Office\\Excel.exe)
#opens z in excel

The behaviour is similar, yet in gnumeric the values are in separated
cells whereas in excel all z  (in fact c(1,2,3,4)) is in one cell.
 
But if I want to edit the results of a calculation:
data(USArrests)
prres - prcomp(USArrests, scale = TRUE)

edit(prres$rotation, editor='gnumeric') #in linux it opens the R-editor,
not gnumeric

the same in windows:
edit(prres$rotation, editor=C:\\Program Files\\Microsoft
Office\\Office\\Excel.exe) #in windows runs the R editor, not excel

My questions are:

a) Is it possible to edit the result of a calculation (like
prres$rotation above) using an external spreadsheet program and not the
R-editor ?

b) If (a) is possible how can the data be edited in excel with one
single value per cell ?

c) If (a) is not possible, can the r-editor window be printed directly ?

Thank you for any help.

L. Tito

PS : I know that I can save results with write.table() and then open the
external file with any program. I just want to know if it is possible to
edit the results directly.

-- 
L. Tito de Morais
  UR RAP
   IRD de Dakar
  BP 1386
   Dakar
  Sénégal

Tél.: + 221 849 33 31
Fax: +221 832 16 75
Courriel: [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Prof Brian Ripley
Use \n in the character string, if I understand you aright, as in

foo -a\nb


On Wed, 5 Nov 2003, Jens Oehlschlägel wrote:

 
 I need to write out with write.table() a csv file allowing for line feeds
 (pure chr(10)) as part of character field (not as a line seperator).
 
 How can I do that?

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Multiple comparisons with a glm

2003-11-05 Thread Ken Knoblauch
I've never seen anything written about multiple comparisons,
as in the multcomp package or with TukeyHSD, but using a glm. 
 Do such procedures exist?  Are they sensible?
Are there any packages in R that implement such comparisons?
Thank you.


-- 
Ken Knoblauch
Inserm U371
Cerveau et Vision
18 avenue du Doyen Lepine
69675 Bron cedex
France
Tel: +33 (0)4 72 91 34 77
Fax: +33 (0)4 72 91 34 61
Portable: 06 84 10 64 10
email: [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Transfer Function Estimation

2003-11-05 Thread Rick Bilonick
Suppose you estimate the ARIMA(p,d,q) paramters for an input x[t] using 
the arima function. Is there an easy way to apply these values to the 
output y[t] for transfer function modeling? For example, if I estimate a 
(2,1,1) ARIMA for x[t] with ar(1) = 0.5882, ar(2) = -0.01517, and ma(1) 
= -0.9688, how can apply these to y[t] so I can then estimate the ccf 
between the two sets of pre-whitened values?

Rick B.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] fast nearest-neighbor for R?

2003-11-05 Thread Mirka Zednikova
Is fast nearest-neighbor functionality available for
R?

I was thinking of something along the lines of what's
currently in S+SPATIALSTATS.

Thanks for any information anyone might have on this.

- MZ

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Jens Oehlschlägel


Brian, Simon,

Thanks for your quick answers. Unfortunately neither \n nor \012 works.
Under R for Windows (tried on 1.8.0 and 1.5.1) they are automatically converted
to chr(13)+chr(10).

I need only chr(10) within my string column, and chr(13)+chr(10) at line
ends of the csv file. If it can't be solved within R, I could workaround by
substituting all chr(13)+chr(10) into chr(10) after writing the file using a
system() call. However, writing the files twice would be ugly and performance
reducing (I am writing an interface).

Any idea?

Best regards


Jens Oehlschlägel

--

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] for help about R

2003-11-05 Thread L Z
 just want to ask the following
  question:
   probit-glm(y1~x1+x2-1,
  family=binomial(link=probit))
  Warning message:
  fitted probabilities numerically 0 or 1 occurred
in:
  glm.fit(x = X, y = Y,
  weights = weights, start = start, etastart =
  etastart,
  why does that happen?

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Logical matrices

2003-11-05 Thread Aurora Torrente
Hello,
I've been trying to work with 0-1 matrices as if they were logical, but 
using the logical operators doesn't produce what I need, for using the 
matrix B:

[,1] [,2] [,3] [,4] [,5]
[1,]10100
[2,]01000
[3,]00101
gives me the following:

 B[1,]-B[1,] || B[3,]

 B
[,1] [,2] [,3] [,4] [,5]
[1,]11111
[2,]01000
[3,]00101
instead of :

[,1] [,2] [,3] [,4] [,5]
[1,]10101
[2,]01000
[3,]00101
which is what I need.
I've tried to convert it into a logical matrix, but the result was a vector:
 C-as.logical(B)
 C
[1]  TRUE FALSE FALSE  TRUE  TRUE FALSE  TRUE FALSE  TRUE  TRUE FALSE 
FALSE  TRUE FALSE  TRUE

What could I do? Thanks for your help,

   Aurora

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] RE: [Rd] fast nearest-neighbor in R?

2003-11-05 Thread Liaw, Andy
Please send such queries to R-help.

See if knn() in the class package (part of the VR bundle that is shipped
with R) does what you want.

Andy

 -Original Message-
 From: Mirka Zednikova [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 05, 2003 11:58 AM
 To: [EMAIL PROTECTED]
 Subject: [Rd] fast nearest-neighbor in R?
 
 
 Is fast nearest-neighbor functionality available in R?
 I was thinking of something along the lines of what's
 currently in S+SPATIALSTATS.
 
 Thanks for any information anyone might have on this.
 
 - MZ
 
 __
 [EMAIL PROTECTED] mailing list 
 https://www.stat.math.ethz.ch/mailman/listinfo /r-devel


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Logical matrices

2003-11-05 Thread Uwe Ligges
Aurora Torrente wrote:

Hello,
I've been trying to work with 0-1 matrices as if they were logical, but 
using the logical operators doesn't produce what I need, for using the 
matrix B:

[,1] [,2] [,3] [,4] [,5]
[1,]10100
[2,]01000
[3,]00101
gives me the following:

  B[1,]-B[1,] || B[3,]


|| doesn't work vectorized, but | does, therefore try:

 B[1,] - B[1,] | B[3,]

and please read
 ?|
Uwe Ligges



  B
[,1] [,2] [,3] [,4] [,5]
[1,]11111
[2,]01000
[3,]00101
instead of :

[,1] [,2] [,3] [,4] [,5]
[1,]10101
[2,]01000
[3,]00101
which is what I need.
I've tried to convert it into a logical matrix, but the result was a 
vector:

  C-as.logical(B)
  C
[1]  TRUE FALSE FALSE  TRUE  TRUE FALSE  TRUE FALSE  TRUE  TRUE FALSE 
FALSE  TRUE FALSE  TRUE

What could I do? Thanks for your help,

   Aurora

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] How to call R from C?

2003-11-05 Thread veronica


Hi. I Would like to know if it is possible to call R from C and how can I do 
it. There is any material about this or examples?

tanks for help,

Veronica.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Multiple comparisons with a glm

2003-11-05 Thread Achim Zeileis
On Wednesday 05 November 2003 17:28, Ken Knoblauch wrote:

 I've never seen anything written about multiple comparisons,
 as in the multcomp package or with TukeyHSD, but using a glm.
  Do such procedures exist?  Are they sensible?
 Are there any packages in R that implement such comparisons?

simint() and simtest() both have methods for glm objects.

hth,
Z

 Thank you.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Logical matrices

2003-11-05 Thread Spencer Graves
 Please read 'help(|)':  | performs elementwise comparison, 
while || 'evaluates left to right examining only the first element of 
each vector.  Evaluation proceeds only until the result is determined.' 

 Consider the following: 

 B - cbind(diag(3), rep(0, 3), c(0,0,1))
 B[1,3] - 1
 B[1,]|B[3,]
[1]  TRUE FALSE  TRUE FALSE  TRUE
 B[1,]||B[3,]
[1] TRUE
 hope this helps.  spencer graves

Aurora Torrente wrote:

Hello,
I've been trying to work with 0-1 matrices as if they were logical, 
but using the logical operators doesn't produce what I need, for using 
the matrix B:

[,1] [,2] [,3] [,4] [,5]
[1,]10100
[2,]01000
[3,]00101
gives me the following:

 B[1,]-B[1,] || B[3,]

 B
[,1] [,2] [,3] [,4] [,5]
[1,]11111
[2,]01000
[3,]00101
instead of :

[,1] [,2] [,3] [,4] [,5]
[1,]10101
[2,]01000
[3,]00101
which is what I need.
I've tried to convert it into a logical matrix, but the result was a 
vector:

 C-as.logical(B)
 C
[1]  TRUE FALSE FALSE  TRUE  TRUE FALSE  TRUE FALSE  TRUE  TRUE FALSE 
FALSE  TRUE FALSE  TRUE

What could I do? Thanks for your help,

   Aurora

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to call R from C?

2003-11-05 Thread Jeff Gentry
 Hi. I Would like to know if it is possible to call R from C and how can I do 
 it. There is any material about this or examples?

You'll want to read through the Writing R Extensions document at:
http://cran.r-project.org/manuals.html

-J

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Logical matrices

2003-11-05 Thread Giovanni Petris

consult the help page for ||

?||

-- 

 __
[  ]
[ Giovanni Petris [EMAIL PROTECTED] ]
[ Department of Mathematical Sciences  ]
[ University of Arkansas - Fayetteville, AR 72701  ]
[ Ph: (479) 575-6324, 575-8630 (fax)   ]
[ http://definetti.uark.edu/~gpetris/  ]
[__]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Prof Brian Ripley
You must be writing a text file.  Use file(foo, wb), and sep=\r\n.

On Wed, 5 Nov 2003, Jens Oehlschlägel wrote:

 Brian, Simon,
 
 Thanks for your quick answers. Unfortunately neither \n nor \012 works.
 Under R for Windows (tried on 1.8.0 and 1.5.1) they are automatically
 converted to chr(13)+chr(10).
 
 I need only chr(10) within my string column, and chr(13)+chr(10) at line
 ends of the csv file. If it can't be solved within R, I could workaround by
 substituting all chr(13)+chr(10) into chr(10) after writing the file using a
 system() call. However, writing the files twice would be ugly and performance
 reducing (I am writing an interface).

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Mean Significance

2003-11-05 Thread Liaw, Andy
As Prof. Ripley said, the test on contrast is valid only if you selected the
contrast before seeing the data.  Using the same data for both hypothesis
generation and hypothesis confirmation is extremely hazardous!

Andy

 From: Igor Roytberg [mailto:[EMAIL PROTECTED] 
 
 Hello,
 
 If you determine the means of x treatments and see that one 
 is larger than the others, can you use a sample normal to 
 determine how statistically significant the difference is? or 
 would contrasts by a better tool? How would one go about to 
 do this in R?
 
 Thanks for any help (since R is new to me),
 
 Igor

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] save(iris,file=clipboard,ascii=TRUE)

2003-11-05 Thread Gabor Grothendieck


Is this a bug?  I thought that clipboard could always be substituted
for a filename when dealing with ASCII files.

 data(iris)
 save(iris,ascii=TRUE,file=clipboard)
Error in file(file, wb) : `mode' for the clipboard must be `r' or `w'

Also this (where gclip is a utility found at unxutils.sourceforge.net
that copies its standard input to the clipboard):

 save(iris,ascii=TRUE,file=myiris.rda)
 system(cmd /c gclip  myiris.rda)
 load(clipboard)
Error in open.connection(con, rb) : unable to open connection
In addition: Warning message:
cannot open compressed file `clipboard'




___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Thomas Lumley
On Wed, 5 Nov 2003, Jens [ISO-8859-1] Oehlschlägel wrote:



 Brian, Simon,

 Thanks for your quick answers. Unfortunately neither \n nor \012 works.
 Under R for Windows (tried on 1.8.0 and 1.5.1) they are automatically converted
 to chr(13)+chr(10).


You may have to write as a binary file to get this to work. I would try
opening a binary file connection and passing it to write.csv, but that
might mess up the real line endings.

-thomas

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] save(iris,file=clipboard,ascii=TRUE)

2003-11-05 Thread Prof Brian Ripley
As should be evident , you thought wrong (and you are thinking in the
blinkered Windows way, too).

On Windows, file() can take a filename clipboard in text mode only.
load() and save() are not using file(), but you could probably use it
explicitly in ASCII mode.

Don't assume your own errors are bugs in other peoples' work: it is 
discourteous.

On Wed, 5 Nov 2003, Gabor Grothendieck wrote:

 
 
 Is this a bug?  I thought that clipboard could always be substituted
 for a filename when dealing with ASCII files.
 
  data(iris)
  save(iris,ascii=TRUE,file=clipboard)
 Error in file(file, wb) : `mode' for the clipboard must be `r' or `w'
 
 Also this (where gclip is a utility found at unxutils.sourceforge.net
 that copies its standard input to the clipboard):
 
  save(iris,ascii=TRUE,file=myiris.rda)
  system(cmd /c gclip  myiris.rda)
  load(clipboard)
 Error in open.connection(con, rb) : unable to open connection
 In addition: Warning message:
 cannot open compressed file `clipboard'
 
 
 
 
 ___
 No banners. No pop-ups. No kidding.
 Introducing My Way - http://www.myway.com
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 
 

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] USA map

2003-11-05 Thread Ray Brownrigg
 Ivar Herfindal [EMAIL PROTECTED] wrote:
 
 On Wed,  5 Nov 2003 11:28:42 +0100 (MET), Mathieu Ros 
 [EMAIL PROTECTED] wrote:
 
  k == kjetil  [EMAIL PROTECTED] disait:
 
  snip
  k I also tried
 
  k map(worldHires,sweden)
  k map(worldHires,denmark) # which comes out very small since it
  k  # includes the Faroe k   
  # islands properly faraway
 
  and, just to know, how would you do to plot *only* continental
  denmark? The same applies for france, UK, ...
 
 Hello
 
 One simple way of doing it is to specify the xlim and ylim of your map, 
 e.g. library(maps)
 map('world', 'Norway', xlim=c(5, 33), ylim=c(55, 75))
 
But the 'best' way is RTFM!
map(world, Norway, exact=T)

Ray Brownrigg

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] query on proxy settings for R.

2003-11-05 Thread Prof Brian Ripley
RTFM, specifically ?download.file.

On Wed, 5 Nov 2003, Dipti Kamdar wrote:

 I have R installed on SuSE.
 I am trying to find out as to where is the proxy information
 stored and how it is stored. 

It is not `stored' it is looked up.

 I was trying to run the install.package(...)  command on
 the R prompt and it complained that it could not find the URL
 http://cran

-- 
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://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] save(iris,file=

2003-11-05 Thread Gabor Grothendieck


I tried it using file and it seems to work for saving:

 data(iris)
 con - file(clipboard,w)
 save(iris,ascii=T,file=con)
 close(con)
 readLines(clipboard)
... lengthy output follows which seems correct ...

but not for loading:

 con - file(clipboard,r)
 load(con)
Error in load(con) : loading from connections not compatible with magic number

even though when I try it with real files then it works both ways:

 save(iris,ascii=T,file=myiris.rda)
 rm(iris)
 load(myiris.rda)
 ls()
... iris is back ...

--- 

Date: Wed, 5 Nov 2003 19:01:20 + (GMT) 
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Gabor Grothendieck [EMAIL PROTECTED] 
Cc: [EMAIL PROTECTED] 
Subject: Re: [R] save(iris,file=clipboard,ascii=TRUE) 
 
As should be evident , you thought wrong (and you are thinking in the
blinkered Windows way, too).

On Windows, file() can take a filename clipboard in text mode only.
load() and save() are not using file(), but you could probably use it
explicitly in ASCII mode.

Don't assume your own errors are bugs in other peoples' work: it is 
discourteous.

On Wed, 5 Nov 2003, Gabor Grothendieck wrote:

 
 
 Is this a bug? I thought that clipboard could always be substituted
 for a filename when dealing with ASCII files.
 
  data(iris)
  save(iris,ascii=TRUE,file=clipboard)
 Error in file(file, wb) : `mode' for the clipboard must be `r' or `w'
 
 Also this (where gclip is a utility found at unxutils.sourceforge.net
 that copies its standard input to the clipboard):
 
  save(iris,ascii=TRUE,file=myiris.rda)
  system(cmd /c gclip  myiris.rda)
  load(clipboard)
 Error in open.connection(con, rb) : unable to open connection
 In addition: Warning message:
 cannot open compressed file `clipboard'



___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Contributing to the R Extensions documentation

2003-11-05 Thread Ross Boylan
I thought there were some gaps in the R Extensions document; in
particular, I was left wondering how to create a list.  I think a
paragraph on it would be useful.

I would be happy to contribute the paragraph, but I'm not sure if
there's interest or what the procedure is.  Can anyone advise me?

Though I was looking at the 1.7.0 version, I just checked 1.8.0 and the
relevant section seems the same.

My ulterior motive is to discover if my understanding of lists is
actually correct :)
-- 
Ross Boylan  wk:  (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4  [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics   fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840 hm:  (415) 550-1062

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] map does not display maps, MacOSX

2003-11-05 Thread Ray Brownrigg
Philippe Glaziou [EMAIL PROTECTED] wrote:
 
 I installed the maps and mapdata libraries on my R-1.8.0 on
 MacOSX 10.2.8 (jaguar on a powerbook G4), and failed to make the
 map function work properly:
 
 
 R : Copyright 2003, The R Development Core Team
 Version 1.8.0  (2003-10-08)
 [...]
 
  library(maps)
  map()
 Error in file(file, r) : unable to open connection
 In addition: Warning message: 
 cannot open file `/Users/glaziou/Library/R/maps/mapdata//world.N' 
  map('usa')
 Error in file(file, r) : unable to open connection
 In addition: Warning message: 
 cannot open file `/Users/glaziou/Library/R/maps/mapdata//usa.N' 
  system('ls -l /Users/glaziou/Library/R/maps/mapdata')
 total 1796
 -rw-r--r--   1 root staff  143902 Oct 14 11:30 county.G
 -rw-r--r--   1 root staff  690260 Oct 14 11:30 county.L
 -rw-r--r--   1 root staff 618 Oct 14 11:30 nz.G
 -rw-r--r--   1 root staff   13040 Oct 14 11:30 nz.L
 -rw-r--r--   1 root staff2642 Oct 14 11:30 state.G
 -rw-r--r--   1 root staff   96892 Oct 14 11:30 state.L
 -rw-r--r--   1 root staff 282 Oct 14 11:30 usa.G
 -rw-r--r--   1 root staff   58232 Oct 14 11:30 usa.L
 -rw-r--r--   1 root staff   74434 Oct 14 11:30 world.G
 -rw-r--r--   1 root staff  295152 Oct 14 11:30 world.L
 -rw-r--r--   1 root staff   74434 Oct 14 11:30 world2.G
 -rw-r--r--   1 root staff  295152 Oct 14 11:30 world2.L
 -rw-r--r--   1 root staff   54832 Oct 14 11:30 world2.N
 
Note the actual file requested (usa.N) doesn't actually exist!

 :
 
 Any hint appreciated,
 
I had this sort of problem on a Windows system, and had to add an extra
command into Makefile.win.  [Is there recognised such a thing as
Makefile.mac? I seem to recall there used to be, but it is not mentioned
in the latest R-exts.]

What you need to do is add the line:

$(CP) ${*}.n ../inst/mapdata/${*}.N # need this here for Mac

as the second line of the .gon.g: target in maps/src/Makefile.
[note the first character is a tab]

I'll fix this (and the //) in the next version.

Ray Brownrigg

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Multiple comparisons with a glm

2003-11-05 Thread Torsten Hothorn

 I've never seen anything written about multiple comparisons,
 as in the multcomp package or with TukeyHSD, but using a glm.
  Do such procedures exist?  Are they sensible?
 Are there any packages in R that implement such comparisons?

since version 0.4-0 in `multcomp':

 0.4-0 (13.08.2003)

`simint' and `simtest' now have methods for `lm' and `glm'

But you are right that there is not much theory about it (at least to my
knowledge). The procedures in `multcomp' allow for inference
on parameter estimates which are, asymptotically, multivariate normal
with known correlation structure.

Best,

Torsten


 Thank you.


 --
 Ken Knoblauch
 Inserm U371
 Cerveau et Vision
 18 avenue du Doyen Lepine
 69675 Bron cedex
 France
 Tel: +33 (0)4 72 91 34 77
 Fax: +33 (0)4 72 91 34 61
 Portable: 06 84 10 64 10
 email: [EMAIL PROTECTED]

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help



__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] ETA for 1.8.1 ?

2003-11-05 Thread Murray Jorgensen
When is version 1.8.1 likely to be released?

Murray

--
Dr Murray Jorgensen  http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: [EMAIL PROTECTED]Fax 7 838 4155
Phone  +64 7 838 4773 wk+64 7 849 6486 homeMobile 021 1395 862
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] R for various ports of linux

2003-11-05 Thread Nathan Leon Pace, MD, MStat
To all:

I currently download the R binaries for Redhat 7.x Linux.

There is considerable turmoil in the vendors of Linux. Redhat 
apparently is changing it's business model to paid versions.

This might motivate my department to use a different vendor of Linux.

Is there anything predictable about which vendors/versions of Linux 
will have R binaries in the future?

Thanks,

Nathan

PS I looked at CRAN and didn't immediately find any info about the 
future.

Nathan Leon Pace, MD, MStat Work:[EMAIL PROTECTED]
Department of AnesthesiologyHome:[EMAIL PROTECTED]
University of Utah  Work:801.581.6393
Salt Lake City, UtahHome:801.467.2925
Fax:801.581.4367   
 Cell:801.558.3987
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] query on proxy settings for R.

2003-11-05 Thread Luke Tierney
On Wed, 5 Nov 2003, Dipti Kamdar wrote:

 Hi,
 I have R installed on SuSE.
 I am trying to find out as to where is the proxy information
 stored and how it is stored. 
 I was trying to run the install.package(...)  command on
 the R prompt and it complained that it could not find the URL
 http://cran
 Thank you,
 Dipti

If you are having proxy-related problems on SuSE this may be related
to the fact that SuSE shell startup scripts on your system may define
the environment variable no_proxy.  This was discussed in a thread back
in July; see for example

https://stat.ethz.ch/pipermail/r-help/2003-July/035410.html

luke

-- 
Luke Tierney
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
   Actuarial Science
241 Schaeffer Hall  email:  [EMAIL PROTECTED]
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-05 Thread kjetil
On 5 Nov 2003 at 10:24, David Brahm wrote:

 
 For a few functional categories there are general help pages, and you might
 not easily stumble across them.  Here's a list I came up with recently.  Just
 type e.g. ?Arithmetic at the R prompt to learn about Arithmetic Operators.
 
 ?Arithmetic
 ?Comparison
 ?Control
 ?DateTimeClasses
 ?Defunct
 ?Deprecated
 ?Devices
 ?Extract (same as ?Subscript)
 ?Foreign
 ?Logic
 ?Memory
 ?Paren
 ?Rdconv  (RdUtils page: Rdconv, Rd2dvi, Rd2txt, Sd2Rd)
 ?Special (beta, gamma, choose, ...)
 ?Startup
 ?Syntax
 ?build   (PkgUtils page: R CMD build, R cmd check)
 ?connections (file, pipe, ...)
 ?pi  (Constants page: LETTERS, letters, month.abb, month.name, pi)
 

Could this list be put easily visible in ome of the places refered at 
startup, like ?help, demo(), or in the first page of 
help.start()
?

Kjetil Halvorsen

 -- 
   -- David Brahm ([EMAIL PROTECTED])
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread Jason Turner
Nathan Leon Pace, MD, MStat wrote:

To all:

I currently download the R binaries for Redhat 7.x Linux.

There is considerable turmoil in the vendors of Linux. Redhat apparently 
is changing it's business model to paid versions.

This might motivate my department to use a different vendor of Linux.

Is there anything predictable about which vendors/versions of Linux will 
have R binaries in the future?
Short answer: build from source.  You won't regret it.

Long answer:
The build from source approach is remarkably painless under any Linux 
distribution I've tried (RH, SuSE, Slackware, et. al.).  It's also 
painless under Solaris.

The days of having to be a programmer to build R from source have been 
over for years.  If you're computer literate enough to use R, you're 
probably over-qualified to build from sources.

Kudos to R-core for their attention to detail in making what's 
complicated under the hood quite simple for the end user.

Alternate answer:
If you absolutely must have binaries, there will be binaries as long as 
there are users of your OS with time they wish to commit to building 
them.  This may be where your sysadmin steps in :)

Cheers

Jason
--
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread Ben Bolker

  I've always built from source and almost never had to do anything beyond 
tar zxf sources.tgz; ./configure; make; make install (on various Red Hat 
versions).  On the other hand ... I've been hoping to move in the 
direction of an apt- or rpm-based solution to get a better handle on 
tracking package versions etc. etc. across multiple machines ...  It does 
seem as though the Debian folks (Eddelbuettel [sp]?) are very quick about 
packaging apt versions ...

   Ben

On Thu, 6 Nov 2003, Jason Turner wrote:

 Nathan Leon Pace, MD, MStat wrote:
 
  To all:
  
  I currently download the R binaries for Redhat 7.x Linux.
  
  There is considerable turmoil in the vendors of Linux. Redhat apparently 
  is changing it's business model to paid versions.
  
  This might motivate my department to use a different vendor of Linux.
  
  Is there anything predictable about which vendors/versions of Linux will 
  have R binaries in the future?
 
 Short answer: build from source.  You won't regret it.
 
 Long answer:
 The build from source approach is remarkably painless under any Linux 
 distribution I've tried (RH, SuSE, Slackware, et. al.).  It's also 
 painless under Solaris.
 
 The days of having to be a programmer to build R from source have been 
 over for years.  If you're computer literate enough to use R, you're 
 probably over-qualified to build from sources.
 
 Kudos to R-core for their attention to detail in making what's 
 complicated under the hood quite simple for the end user.
 
 Alternate answer:
 If you absolutely must have binaries, there will be binaries as long as 
 there are users of your OS with time they wish to commit to building 
 them.  This may be where your sysadmin steps in :)
 
 Cheers
 
 Jason
 

-- 
620B Bartram Hall[EMAIL PROTECTED]
Zoology Department, University of Floridahttp://www.zoo.ufl.edu/bolker
Box 118525   (ph)  352-392-5697
Gainesville, FL 32611-8525   (fax) 352-392-3704

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread Marc Schwartz
On Wed, 2003-11-05 at 15:07, Nathan Leon Pace, MD, MStat wrote:
 To all:
 
 I currently download the R binaries for Redhat 7.x Linux.
 
 There is considerable turmoil in the vendors of Linux. Redhat 
 apparently is changing it's business model to paid versions.
 
 This might motivate my department to use a different vendor of Linux.
 
 Is there anything predictable about which vendors/versions of Linux 
 will have R binaries in the future?
 
 Thanks,
 
 Nathan
 
 PS I looked at CRAN and didn't immediately find any info about the 
 future.


At the risk of raising the spectre of a heated discussion, you can
always download the source code for R and compile it locally, which is
what I have been doing for some time. 

That approach also avails you of the updated R-Patched versions, as
opposed to waiting for the next formal release binary version for bug
fixes.

There is a considerable amount of turmoil right now in the commercial
Linux arena and much energy is being expended in the debate. Given the
acquisition of SUSE by Novell/Ximian (with a notable investment by IBM)
this week, that has thrown much of the commercial Linux world market
into a frenzy. You can read Slashdot or other forums to gain a sense of
the spectrum of opinions on this deal.

That activity has prompted some to speculate on when Mandrake will be
acquired given their fragile financial state.

Combine this all with RH's change in direction with the Enterprise arm
of products versus Fedora Core 1 (which went to release today), that has
further aggravated the debate regarding the cost of paid support,
community based distros versus commercial, etc. Fedora Core will be RH's
free community based distro moving forward. If you want/need paid
support from RH, then RHEL is your option there.

Needless to say, Debian is very much still there as well.

Each end-user organization will need to assess its own needs and which
distro meets those needs. It is clear that the commercial entities are
looking to find ways to remain financially viable, while still
attempting to gain market share and evolve.  

Time will tell where it all goes. That time interval will more than
likely be measured in years, not weeks or months.

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] using LSODA in R

2003-11-05 Thread Ivan Kautter
Thanks for the response, Ben.

It's not a case that the list isn't coming out correctly.  It's that the 
numbers that are coming out are not the numbers that these equations should 
be producing if I have specified the equations correctly in R code for use 
with LSODA.  So the question is more if I have the code right when the user 
specifies the differential equations for LSODA.


From: Ben Bolker [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Ivan Kautter [EMAIL PROTECTED]
CC: R help list [EMAIL PROTECTED]
Subject: Re: [R] using LSODA in R
Date: Wed, 5 Nov 2003 08:43:53 -0500 (EST)
  Try returning list(c(Rprime,Cprime,Pprime),NULL) -- the first element in
the returned list should be a numeric *vector* of the derivatives.
  Ben

On Tue, 4 Nov 2003, Ivan Kautter wrote:

 R help list subscribers,

 I am a new user of R.  I am attempting to use R to explore a set of
 equations specifying the dynamics of a three trophic level food chain.  
I
 have put together this code for the function that is to be evaluted by
 LSODA.  My equations Rprime, Cprime, and Pprime are meant to describe 
the
 actual equation of the derivative.  When I run LSODA, I do not get the
 output that these equations should be giving.  Can someone tell me if I 
have
 set this function up correctly to use with LSODA when the user is 
specifying
 the equation of the derivative  or offer some advice for using LSODA in 
R?
 An example of how to code for user specified differential equations 
would be
 great.

 function(times,y,p)
 {
 Rprime -
 (R*(1-R))-((xc*yc*C*R)/(R+R0))-((w*xp*ypr*P*R)/(R02+((1-w)*C)+(w*R)))
 Cprime -
 (-1*(xc*C)*(1-(yc*R)/(R+R0)))-(((1-w)*xp*ypc*P*C)/((w*R)+((1-w)*C)+C0))
 Pprime -
 
(-1*P)-(((1-w)*xp*ypc*C*P)/((w*R)+((1-w)*C)+C0))+((w*xp*ypr*P*R)/((w*R)+((1-w)*C)+R02))
 list(c(Rprime, Cprime, Pprime))
 }

 The above is the function yprime which the documentation for the 
odesolve
 says that I may specify.

 Thanks for any help that anyone can provide.

 Ivan Kautter

 _
 Compare high-speed Internet plans, starting at $26.95.
 https://broadband.msn.com (Prices may vary by service area.)

 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help


--
620B Bartram Hall[EMAIL PROTECTED]
Zoology Department, University of Floridahttp://www.zoo.ufl.edu/bolker
Box 118525   (ph)  352-392-5697
Gainesville, FL 32611-8525   (fax) 352-392-3704
_
Compare high-speed Internet plans, starting at $26.95.  
https://broadband.msn.com (Prices may vary by service area.)

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread A.J. Rossini
Nathan Leon Pace, MD, MStat [EMAIL PROTECTED] writes:

 To all:

 I currently download the R binaries for Redhat 7.x Linux.

 There is considerable turmoil in the vendors of Linux. Redhat
 apparently is changing it's business model to paid versions.

 This might motivate my department to use a different vendor of Linux.

 Is there anything predictable about which vendors/versions of Linux
 will have R binaries in the future?

While many people have commented on building from source, I'll state
that's fine, but it gets old after the 10,000th time.   Sure, it's
amusing, and you get a great pleasure jolt from debugging on novel
platforms and configurations, but it's not real work.

One strategy is to find a distribution where the R maintainer is
someone you trust.

I trust Doug and Dirk (and hence Debian).

best,
-tony 

-- 
[EMAIL PROTECTED]http://www.analytics.washington.edu/ 
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN  Fred Hutchinson Cancer Research Center
UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable
FHCRC  (M/W): 206-667-7025 FAX=206-667-4812 | use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread Jonathan Baron
Is there anything predictable about which vendors/versions of Linux 
will have R binaries in the future?

No.

But, for what it is worth, the RPM for RedHat 9 installs
perfectly on Fedora Severn beta.  This is the closest thing to
Red Hat 10, and I'm going to stick with Fedora unless I learn
that their security announcements are slower than some other
distribution.  In the past, Red Hat has been first almost all the
time to make patches available.  I hope that continues with
Fedora, but we will see.

Jon

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] save(iris,file=

2003-11-05 Thread Gabor Grothendieck


I have played around with this some more and although I still do
not have a solution for loading an .rda file from the Windows
clipboard that is entirely R, with the help of the
pclip utility found at unxutils.sourceforge.net this seems
to work:

 load(pipe(pclip))

---
 
Date: Wed, 5 Nov 2003 14:39:00 -0500 (EST) 
From: Gabor Grothendieck [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED] 
Cc: [EMAIL PROTECTED] 
Subject: Re: [R] save(iris,file= 

I tried it using file and it seems to work for saving:

 data(iris)
 con - file(clipboard,w)
 save(iris,ascii=T,file=con)
 close(con)
 readLines(clipboard)
... lengthy output follows which seems correct ...

but not for loading:

 con - file(clipboard,r)
 load(con)
Error in load(con) : loading from connections not compatible with magic number

even though when I try it with real files then it works both ways:

 save(iris,ascii=T,file=myiris.rda)
 rm(iris)
 load(myiris.rda)
 ls()
... iris is back ...

--- 

Date: Wed, 5 Nov 2003 19:01:20 + (GMT) 
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Gabor Grothendieck [EMAIL PROTECTED] 
Cc: [EMAIL PROTECTED] 
Subject: Re: [R] save(iris,file=clipboard,ascii=TRUE) 

As should be evident , you thought wrong (and you are thinking in the
blinkered Windows way, too).

On Windows, file() can take a filename clipboard in text mode only.
load() and save() are not using file(), but you could probably use it
explicitly in ASCII mode.

Don't assume your own errors are bugs in other peoples' work: it is 
discourteous.

On Wed, 5 Nov 2003, Gabor Grothendieck wrote:

 
 
 Is this a bug? I thought that clipboard could always be substituted
 for a filename when dealing with ASCII files.
 
  data(iris)
  save(iris,ascii=TRUE,file=clipboard)
 Error in file(file, wb) : `mode' for the clipboard must be `r' or `w'
 
 Also this (where gclip is a utility found at unxutils.sourceforge.net
 that copies its standard input to the clipboard):
 
  save(iris,ascii=TRUE,file=myiris.rda)
  system(cmd /c gclip  myiris.rda)
  load(clipboard)
 Error in open.connection(con, rb) : unable to open connection
 In addition: Warning message:
 cannot open compressed file `clipboard'


___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-05 Thread Douglas Bates
Nathan Leon Pace, MD, MStat [EMAIL PROTECTED] writes:

 I currently download the R binaries for Redhat 7.x Linux.
 
 There is considerable turmoil in the vendors of Linux. Redhat
 apparently is changing it's business model to paid versions.
 
 
 This might motivate my department to use a different vendor of Linux.
 
 Is there anything predictable about which vendors/versions of Linux
 will have R binaries in the future?

Debian, and hence Knoppix, will continue to have R binaries.  

For those who are considering switching Linux distributions I would
strongly recommend looking at Knoppix 3.3
(http://www.knopper.net/knoppix/ although for the next few weeks you
will need to click through to
http://www.knopper.net/knoppix/index-old-en.html ) and Dirk
Eddelbuettel's Quantian (http://dirk.eddelbuettel.com/quantian/) which
is based on Knoppix and contains the binaries of all R and Octave
packages as part of the distribution.  Dirk maintains the Debian
packages of R and Octave packages and usually has binary Debian
packages uploaded within a day of a new R release.  (Well technically
Dirk and I are co-maintainers of the R packages for Debian but in
practice it is about 92% Dirk and 8% Doug doing the maintaining.)

If you have never used Knoppix or Quantian you find it astonishing
when you first try it out.  You download one CD-ROM image, burn it
onto a CD and boot from the CD.  Next thing you know you have a
working system.

Dirk presented a paper on Quantian at DSC-2003.  See

http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/Eddelbuettel.pdf

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] USA map

2003-11-05 Thread Jari Oksanen
On Wed, 2003-11-05 at 21:17, Ray Brownrigg wrote:
  Ivar Herfindal [EMAIL PROTECTED] wrote:
  
  On Wed,  5 Nov 2003 11:28:42 +0100 (MET), Mathieu Ros 
  [EMAIL PROTECTED] wrote:
  
   k == kjetil  [EMAIL PROTECTED] disait:
  
   snip
   k I also tried
  
   k map(worldHires,sweden)
   k map(worldHires,denmark) # which comes out very small since it
   k  # includes the Faroe k   
   # islands properly faraway
  
   and, just to know, how would you do to plot *only* continental
   denmark? The same applies for france, UK, ...
  
  Hello
  
  One simple way of doing it is to specify the xlim and ylim of your map, 
  e.g. library(maps)
  map('world', 'Norway', xlim=c(5, 33), ylim=c(55, 75))
  
 But the 'best' way is RTFM!
 map(world, Norway, exact=T)
 
Actually this not a good way, since then you have to trust CIA and its
naming conventions. All large coastal islands are left out (Lofoten
etc), although for some peculiar reason, Tromsø seems to be there.
However, even continental parts of eastern Finmark are excluded (I hope
this does not have political implications). Just compare the following
maps:

map(worldHires,Norway, exact=TRUE, type=n)
map(worldHires,Norway, add=TRUE)
map(worldHires,Norway, add=TRUE, exact=TRUE, col=red)

By the way, where is Estonia? Couln't find it with any strings I could
imagine. Some R core developers have frequented Estonia, so it would be
nice to have that in the map.

cheers, jari oksanen
-- 
Jari Oksanen -- Biologian laitos, Oulun yliopisto, 90014 Oulu
Puh. (08) 553 1526, käsi 040 5136529, fax (08) 553 1061
sposti [EMAIL PROTECTED], kotisivu http://cc.oulu.fi/~jarioksa/

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-05 Thread Hadley Wickham

Similarly help.search can list by categories, aka keywords.  Perhaps its 
help page needs to say where the list of standard keywords is.

 

But to list all the help pages in a given category, you need to use 
help.search(keyword=iplot,agrep=FALSE,package=base)
or is there an easier way?

Hadley

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] building r-patch

2003-11-05 Thread Vadim Ogranovich
Hi,
 
I am building r-patch from the sources (rsync-ed today).
 
make check produced the following message:
 
running tests of Internet and socket functions
  expect some differences
make[3]: Entering directory `/usr/evahome/vograno/R/tests'
running code in 'internet.R' ... OK
comparing 'internet.Rout' to './internet.Rout.save' ...18c18
 Content type `text/plain; charset=iso-8859-1' length 134991 bytes
---
 Content type `text/plain; charset=iso-8859-1' length 124178 bytes
22,23c22,23
 .. .. .. .
 downloaded 131Kb
---
 .. .. .
 downloaded 121Kb
25c25
 [1] 273
---
 [1] 251
60,61d59
 Error in url( http://foo.bar http://foo.bar;, r) : unable to open
connection
 In addition: Warning message: 
62a61
 Error in url( http://foo.bar http://foo.bar;, r) : unable to open
connection
365,370c364
  Login: root  Name: root
 Directory: /root Shell: /bin/tcsh
 Last login Wed Nov  5 13:34 (PST) on pts/1 from
verdi.irisfinancial.com
 New mail received Wed Nov  5 04:02 2003 (PST)
  Unread since Fri Oct 24 04:02 2003 (PDT )
 No Plan.
---
 Error in make.socket(host, port) : Socket not established
 OK

 
 
I noticed that I had to expect some differences so my question is how to
tell whether it's harmless or not?
 
 
Other questions are related to building of recommended packages:
* The src/library/Recommended directory was empty. Is it expected? If
yes, how to download the entire bundle of recommended packages (I know I
can get them one by one)? Is install.packaes() the recommended way?
* make check tried to test MASS and survival (and failed because the
packages were not there), but it didn't try to test the other
recommended  packages. Why only these two?
 
 
Thanks,
Vadim

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] building r-patch

2003-11-05 Thread Dirk Eddelbuettel

Hi Vadim,

On Wed, Nov 05, 2003 at 05:24:31PM -0800, Vadim Ogranovich wrote:
 I am building r-patch from the sources (rsync-ed today).
[...]
 Other questions are related to building of recommended packages:
 * The src/library/Recommended directory was empty. Is it expected? If
 yes, how to download the entire bundle of recommended packages (I know I

Execute the script

$ src/tools/recommended-rsync

which fetch them for you. I call that each time I create Debian packages of
pre-releases, or of patch releases (as so far on 10/24 and 11/01).

Cheers, Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] building r-patch

2003-11-05 Thread Vadim Ogranovich
I thought about the OK. However the MASS and the survival tests
printed OK too, though, as far as I could tell, the packages were not
installed at all (well, maybe this was the reason for calling it OK)

Thank you for the answer. Now I think I can move forward,
Vadim

 -Original Message-
 From: Jason Turner [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 05, 2003 8:50 PM
 To: [EMAIL PROTECTED]
 Cc: R-Help
 Subject: Re: [R] building r-patch
 
 
 Vadim Ogranovich wrote:
 ...
  I am building r-patch from the sources (rsync-ed today).
   
  make check produced the following message:
   
  running tests of Internet and socket functions
expect some differences
 ...  assorted error messages, then ...
   OK
  
   
   
  I noticed that I had to expect some differences so my 
 question is how 
  to tell whether it's harmless or not?
 
 The OK.  If made exited without an error, the regression tests were 
 passed.  In this case, the differences between the 
 maintainers' results 
 and yours were due to local login and network setup differences.
 
 Hope that helps
 
 Jason
 -- 
 Indigo Industrial Controls Ltd. 
 http://www.indigoindustrial.co.nz 64-21-343- 545 
 [EMAIL PROTECTED]
 
 __
 [EMAIL PROTECTED] mailing list 
 https://www.stat.math.ethz.ch/mailman/listinfo /r-help


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help