Re: [R] Does the RPM for RH9 know about TCL/Tk

2003-06-13 Thread Martyn Plummer
On Wed, 2003-06-11 at 12:10, Peter Dalgaard BSA wrote:
 Jonathan Baron [EMAIL PROTECTED] writes:
 
  On 06/10/03 18:30, Morgan Hough wrote:
  Sorry for the probable repeat post but I can only search the list up to
  2002 (is there a better way?). 
  
  Yes, see my search page below.
  
  I am using the RH9 RPM from CRAN but
  packages like AnalyzeFMRI say that tcltk is not found. Do I need to do
  more to get Tk GUIs working on RH9 or does the RPM not have tcltk support
  built in (should I compile from source). Thanks in advance.
  
  There was in fact some discussion of this last month.  I am not
  sure of the answer.  But I installed 1.7.0 from the RPM for RH 9,
  and I got the same error message when trying to get Rcmdr to
  work.  I did have tcl and tk installed.  Unfortunately, I did not
  do a properly controlled experiment.  I first installed tcllib,
  which was not installed originally.  (That didn't help, by
  itself.)  Then I re-installed R _from source_ and then everything
  worked.  But I did have the basic vanilla installation of RH 9,
  and I did have this problem.  So you aren't the only one.  
  
  I still don't know whether tcllib is necessary, and whether the
  RPM itself installs different things depending on what is on the
  system.  (I would assume not, but I'm not sure.)
 
 It shouldn't, but the RPM may be different depending on what was
 present on the system upon which it was built. Martyn may have been
 building on a system where tcl/tk wasn't installed, or -- there's a
 bug report on bugzilla.redhat.com on this -- the build was adversely
 affected by incorrectness of the tclConfig.sh and tkConfig.sh scripts.
 
 A fairly easy experiment would be to rebuild from the source RPM on
 your own system. Since this builds an RPM, it will retain the
 upgradability etc. of the official RPM. Could you try and tell us
 whether the problem remains? (Don't forget that you need a bunch of
 -devel packages installed.)

I have rebuilt the RPM of R 1.7.0 for Red Hat 9 with tcltk support.
(R-1.7.0-2.i386.rpm). It should be available on CRAN in a day or two.  I
apologise for this oversight.

Martyn

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


Re: [R] formula (joint, conditional independence, etc.) - mosaicplots

2003-06-13 Thread David Meyer
On 2003.06.13 02:11, g wrote:
Hi,

Can someone set me straight as to how to write formulas in R to
indicate:
complete independence [A][B][C]
Freq ~ A + B + C

	joint independence [AB][C]
Freq ~ A * B + C

	conditional independence [AC][BC]
Freq ~ A * C + B * C

	nway interaction [AB][AC][BC]
Freq ~ A * B * C - A:B:C

You might have a look at demo(mosaic) in package vcd.

g.,
-d

?

For example, if I have 4 factors:
hair colour, eye colour, age, sex
does
  mosaicplot( frequency ~ hair + eye + age + sex)
mean that the model fitted is of complete independence of all factors
[hair][eye][age][sex]?
So does
 mosaicplot(frequency ~ hair + eye)
mean that the model is of conditional independence
[hairAgeSex][eyeAgeSex]?
How does the operator *  as in
 mosaicplot( frequency ~ hair * eye)
or
 mosaicplot( frequency ~ hair * eye + age)
equate to in the type of independence model used?
Thanks in advance for any elucidation!

Gina

__
[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] Lattice levelplots and (partial) failure on some devices----Long

2003-06-13 Thread Prof Brian Ripley
This is a Windows run-time quirk (bug): Linux gives nan.  It's a problem
with what grid/lattice sends the driver.  Rather than put protection code 
in each driver, it needs to be in the central graphics code.

We've been here several times before 

On Thu, 12 Jun 2003, Joel Kincaid wrote:

 
 
 Dear Community,
 
 (win XP home, sp1; R1.7 -- patched version, binary download, version of 
 lattice obtained with patched version; the following applies to 1.6.2 as 
 well.)
 
 The following message was originally composed to seek help. However I 
 have 'hacked' a solution to the following behavior, but none the less 
 someone might find this interesting.
 
 To reproduce my 'problem' you can use the following code:
 
 library(lattice)
 hypodata - expand.grid(ProdMult = seq(0,1,by=.1),
  WfMult = seq(0,1,by=.1),
  Tr=c(0,75))
 hypodata$UnCC - 4.6 + (hypodata$ProdM^2) * (hypodata$Wf^3 )
 hypodata$UnCC[1:121]   - 4.6
 testfault -levelplot(UnCC ~ WfMult + ProdMult | Tr,
  col.regions=grey(16:0/16),
  data=hypodata)
 
 If one enters
   testfault
 
 the you get the expected result (if a bit uninteresting). This being a 
 blank first panel (hmmm, shouldn't it be 4.6) and then a second panel 
 with a filled contour. (I have a much larger set of simulated data --- 
 about 450 pages of figures, this 'blank' panel appears periodically and 
 is of interest...)
 
 If you do
  pdf(file=testfault.pdf) #Error
  testfault
  dev.off()
 or postscript(...)
 
 then the file is created. Try to open with pdf reader or ghost 
 script---can't be done!, you get the following error from the pdf file:
 
 There was an error processing a page. Two Few operands.
 
 and then you get
 
 An unrecognized token '-1.#J' was found.
 
 and then a blank sheet. Ghostscript returns the first occurrence of the 
 token and then dies a proper death.
 
 Upon opening the pdf file in a text editor one easily locates the 
 following chunk of 'stuff'
 ..
 pdf stuffET
 pdf stuffQ q -216.00 -216.00 864.00 864.00 re W n
 pdf stuffQ q 49.70 37.14 153.47 358.88 re W n
 pdf stuff1.000 1.000 1.000 rg
 pdf stuff  -1.#J -1.#J m
 pdf stuff  -1.#J -1.#J l
 pdf stuff  -1.#J -1.#J l
 pdf stuff  -1.#J -1.#J l
 pdf stuffh f
 
 A naive search and replace of -1.#J with 0.0 , and a save, does the 
 trick. The file will now open in a pdf reader (as well as ghostscript). 
 There is however, a message stating something to the effect that a 
 problem has been found, but the file is being 'rebuilt'.
 
 Now what is interesting is that the above is only a problem for the pdf 
 and postscript devices --- other devices, e.g. win.metafile, png, jpg, 
 etc. work fine .
 
 (However a similar setup, I'll track it down it someone thinks it would 
 be of use, will trigger a crash that seems to associated with the 
 'ntdll.dll' dyn. lnk. library(?)
 E.g from the event viewer I get...
 
 Faulting application rgui.exe, version 1.70.30515.0, faulting module 
 ntdll.dll, version 5.1.2600.1106, fault address 0x000267cd
 
 : 6c707041 74616369 206e6f69 6c696146
 0010: 20657275 75677220 78652e69 2e312065
 0020: 332e3037 35313530 6920302e 746e206e
 0030: 2e6c6c64 206c6c64 2e312e35 30303632
 0040: 3031312e 74612036 6f20 20746573
 0050: 32303030 64633736 0a0d
 )
 
 
 If you use the data above and try things with the base package plots --- 
 contour and filled.contour (for the constant 4.6 data),
 
 contour gives the error message:
 ...stack imbalance in internal contour
 and plots an empty graphics box. However it saves to all of the devices 
 exactly as on the screen device.
 
 The following
  filled.contour( x=seq(0,1,by=.1),
  y=seq(0,1,by=.1),
  z=matrix(rep(4.6,121),nrow=11,ncol=11))
 gives  the expected 'slightly pink' filled contour and can be written to 
   all of the devices with no problem.
 
 Thus it appear to me that there is some interaction between some of the 
 devices and lattice (is the string -1.#J some kind of character set 
 for NA or NaN or NULL???). I tried to find the area in the lattice code 
 that seemed to deal with this issue  and found some call to (i guess) C 
 code around lines 4554 which deal with 'NA's in the datahowever I 
 was a bit lost(Also searching the base code I could find no 
 reference to the error message returned from the contour() example 
 above)
 
 
 In summary, is there a way to avoid this issue and keep the 'blank' 
 panels, and not have to do this search and replace (on a 450 page pdf 
 file it takes about 15 mins ),
 
 cheers,
 Joel
 
 __
 [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 

[R] Layout of windows devices

2003-06-13 Thread David Khabie-Zeitoune
Hi
 
Is there a way to specify the location on the screen where a new
graphics device opens, for example with a call to win.graph()?
I'm using R 1.7.0 on Windows XP.
 
Thank you.
 
Regards,
 
David

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


[R] (no subject)

2003-06-13 Thread Francesc Bosch Albareda
Dear collegues,

Using maxstat I am getting the following:

 blood - maxstat.test(Surv(SUPER, FV)~ZAP,data=zap70, smethod=LogRank)
Error in maxstat(y = structure(c(24.4301369863014, 26.4164383561644,
18.7835616438356,  : couldn't find function cscores


I do not know the meaning of this problem. Could you please help me on dat?

Thank you in advance for your time.

Sincerely,

Francesc Bosch, M.D.
Senior specialist
Department of Hematology, Hospital Clinic
C/ Villarroel, 170
08036 - Barcelona
Phone  Fax: +34-93-227 5428
e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

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


Re: [R] Layout of windows devices

2003-06-13 Thread Duncan Murdoch
On Fri, 13 Jun 2003 11:05:30 +0100, you wrote:

Hi
 
Is there a way to specify the location on the screen where a new
graphics device opens, for example with a call to win.graph()?
I'm using R 1.7.0 on Windows XP.

There isn't currently, but it should be possible to add it.  The
window creation is done in src/gnuwin32/devga.c.  

However, the user interface doesn't look easy.  Windows machines can
have more than one monitor, so you'd want to be able to say which
monitor it would appear on, as well as where.  I think you'd want to
be able to query the monitor size to make the choice useful.  

Is this something that you'd be able to do a first pass through?  I'd
be happy to put it in if someone else did most of the work, but I've
got a lot of other things in the works, and this looks too
time-consuming for a relatively small payback.  After all, you can
manually move the window after it is created.

Duncan Murdoch

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


Re: [R] (no subject)

2003-06-13 Thread Torsten Hothorn

 Dear collegues,

 Using maxstat I am getting the following:

  blood - maxstat.test(Surv(SUPER, FV)~ZAP,data=zap70, smethod=LogRank)
 Error in maxstat(y = structure(c(24.4301369863014, 26.4164383561644,
 18.7835616438356,  : couldn't find function cscores


`cscores' is provided by package `exactRankTests'. Package `maxstat'
depends on it and `exactRankTests' should be imported automatically. Try

R require(exactRankTests)

to find out what's going wrong.

Best,

Torsten


 I do not know the meaning of this problem. Could you please help me on dat?

 Thank you in advance for your time.

 Sincerely,

 Francesc Bosch, M.D.
 Senior specialist
 Department of Hematology, Hospital Clinic
 C/ Villarroel, 170
 08036 - Barcelona
 Phone  Fax: +34-93-227 5428
 e-mail: [EMAIL PROTECTED] mailto:[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] lars - lasso problem

2003-06-13 Thread Martin Wegmann
hello 

I tried to use lars() but neither with my own data nor with the sample data it  
works. I get in both cases the following error prompt: 

 data(diabetes)
 par(mfrow=c(2,2))
 attach(diabetes)
 x-lars(x,y)
Error in one %*% x : requires numeric matrix/vector arguments
 x-lars(x,y, type=lasso)
Error in one %*% x : requires numeric matrix/vector arguments
 x-lars(x,y, type=lar)
Error in one %*% x : requires numeric matrix/vector arguments

due to the prompt requires numeric matrix... I changed the variables to 
matrix/vector or used different columns but it doesn't work either. 

what does error in one %*%x mean? 

thanks in advance, cheers Martin

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


RE: [R] covariate data errors

2003-06-13 Thread Paul, David A
I have found Mixed Effects Models in S and Splus by 
Drs. Pinheiro and Bates to be enormously helpful.
I highly recommend the book - it contains excellent
examples.

Best,
  david paul

-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2003 2:54 AM
To: Andy Jacobson
Cc: [EMAIL PROTECTED]
Subject: Re: [R] covariate data errors


Do you mean correlations in the *errors*?  The residuals are always 
correlated.  What does this have to do with your subject line -- it is 
errors in the dependent variable I think you mean?

If you have correlated errors, you should be using generalized least squares
not least squares or weighted least squares.  (That is covered in all good
books on regression: I don't know your level, but Seber's has a
comprehensive account.)  There are several R functions to fit GLS, including
gls(nlme) and lm.gls(MASS).


On Thu, 12 Jun 2003, Andy Jacobson wrote:

 Greetings,
 
   I would like to fit a multiple linear regression model in which the 
 residuals are expected to follow a multivariate normal distribution, 
 using weighted least squares.  I know that the data in question have 
 biases that would result in correlated residuals, and I have a means 
 for quantifying those biases as a covariance matrix. I cannot, 
 unfortunately, correct the data for these biases.
 
   It seems that this should be a straightforward task, but so much of 
 the literature is concerned with the probability model in which the 
 residuals are uncorrelated that I can't find a good reference.  So in 
 order of importance, please, can someone point me to a definitive 
 reference for least squares with correlated residuals, and is there a 
 standard R package to handle this case?
 
   Many thanks in advance,
 
   Anthony
 
 __
 [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

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


RE: [R] Layout of windows devices

2003-06-13 Thread David Khabie-Zeitoune
Duncan -- thanks for your reply. As you point out -- this is more a
nice-to-have and should not really be prioritised in any way. I
currently run a lengthy statistical process in which intermediate
results are continually output to many graph devices and I was wondering
if there was an existing way to programatically tile the devices rather
than do it manually each time. I would have been happy to use any
existing functionality, but certainly do not think it is important
enough to merit any development work. I think I will rewrite the output
code to use just one (larger) graphics device which is tiled using
layout() or split.screen() instead.

Thanks again
David


-Original Message-
From: Duncan Murdoch [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2003 12:09
To: David Khabie-Zeitoune
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Layout of windows devices


On Fri, 13 Jun 2003 11:05:30 +0100, you wrote:

Hi
 
Is there a way to specify the location on the screen where a new 
graphics device opens, for example with a call to win.graph()? I'm 
using R 1.7.0 on Windows XP.

There isn't currently, but it should be possible to add it.  The window
creation is done in src/gnuwin32/devga.c.  

However, the user interface doesn't look easy.  Windows machines can
have more than one monitor, so you'd want to be able to say which
monitor it would appear on, as well as where.  I think you'd want to be
able to query the monitor size to make the choice useful.  

Is this something that you'd be able to do a first pass through?  I'd be
happy to put it in if someone else did most of the work, but I've got a
lot of other things in the works, and this looks too time-consuming for
a relatively small payback.  After all, you can manually move the window
after it is created.

Duncan Murdoch

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


Re: [R] Layout of windows devices

2003-06-13 Thread Prof Brian Ripley
There is already support for this in the R-devel version: it like the 
current approach assumes one screen, though.  From the CHANGES file

  The initial size and position of the MDI frame can be set in Rconsole:
  see the comments in .../etc/Rconsole.  The initial position of the
  console window and graphics windows can be set in Rconsole and in the
  GUI Preferences editor.

That version is a long way off release (ca October) but feedback and
patches are welcome.

On Fri, 13 Jun 2003, Duncan Murdoch wrote:

 On Fri, 13 Jun 2003 11:05:30 +0100, you wrote:
 
 Hi
  
 Is there a way to specify the location on the screen where a new
 graphics device opens, for example with a call to win.graph()?
 I'm using R 1.7.0 on Windows XP.
 
 There isn't currently, but it should be possible to add it.  The
 window creation is done in src/gnuwin32/devga.c.  
 
 However, the user interface doesn't look easy.  Windows machines can
 have more than one monitor, so you'd want to be able to say which
 monitor it would appear on, as well as where.  I think you'd want to
 be able to query the monitor size to make the choice useful.  

That is already done, to put the graphics window at the top right.

 Is this something that you'd be able to do a first pass through?  I'd
 be happy to put it in if someone else did most of the work, but I've
 got a lot of other things in the works, and this looks too
 time-consuming for a relatively small payback.  After all, you can
 manually move the window after it is created.

-- 
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] Layout of windows devices

2003-06-13 Thread Prof Brian Ripley
Oh, I see now you want to do this differently for each instance of a
device. That would easy to add via arguments to windows(), as the
internal code is already there.

On Fri, 13 Jun 2003, David Khabie-Zeitoune wrote:

 Duncan -- thanks for your reply. As you point out -- this is more a
 nice-to-have and should not really be prioritised in any way. I
 currently run a lengthy statistical process in which intermediate
 results are continually output to many graph devices and I was wondering
 if there was an existing way to programatically tile the devices rather
 than do it manually each time. I would have been happy to use any
 existing functionality, but certainly do not think it is important
 enough to merit any development work. I think I will rewrite the output
 code to use just one (larger) graphics device which is tiled using
 layout() or split.screen() instead.
 
 Thanks again
 David
 
 
 -Original Message-
 From: Duncan Murdoch [mailto:[EMAIL PROTECTED] 
 Sent: 13 June 2003 12:09
 To: David Khabie-Zeitoune
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Layout of windows devices
 
 
 On Fri, 13 Jun 2003 11:05:30 +0100, you wrote:
 
 Hi
  
 Is there a way to specify the location on the screen where a new 
 graphics device opens, for example with a call to win.graph()? I'm 
 using R 1.7.0 on Windows XP.
 
 There isn't currently, but it should be possible to add it.  The window
 creation is done in src/gnuwin32/devga.c.  
 
 However, the user interface doesn't look easy.  Windows machines can
 have more than one monitor, so you'd want to be able to say which
 monitor it would appear on, as well as where.  I think you'd want to be
 able to query the monitor size to make the choice useful.  
 
 Is this something that you'd be able to do a first pass through?  I'd be
 happy to put it in if someone else did most of the work, but I've got a
 lot of other things in the works, and this looks too time-consuming for
 a relatively small payback.  After all, you can manually move the window
 after it is created.
 
 Duncan Murdoch
 
 __
 [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] R 1.7.0 startup error: .addMethodFrom...

2003-06-13 Thread Joel Kincaid
I've had a similar problem that seems to be assoociated with two events 
(using 1.7.0 and win XP home sp1):
1. when using the update.packages() feature from the menu and having the 
system hang. subsequent attempts to start Rgui fail. (However, rterm 
will run -- )
2. or after any time Rgui is hung, there seems to be the *risk* that 
there  will be a problem with some aspect of the methods package. I 
posted a similar note last month but was unable to reproduce the problem 
on a consistent basis

See the 6/4/03 message and reply from Duncan Murdoch about Win XP and 
crashes for a link to a developmental version  of R that (i'm assuming) 
is a latter version of R patched that seems to have eliminated this 
problem for me. (There was an earlier message that 1.7.1 was due to come 
out mid june --

hth
Joel Kincaid
The solution seems to be to download the pathced version of 1.7.0 from 
cran.

[EMAIL PROTECTED] wrote:
Does anyone know what could be causing the following error message on
startup of R:
Error in .addMethodFrom(def,argName[1],class[1],fromClass) :
  object *tmp* not found.
I'm using R 1.7.0 and Windows 2000.

This happened shortly after I installed 1.7.0. Once it occurs, R freezes.
From then on R will always freeze with this error message.
I reinstalled 1.7.0 and it worked reliably for a couple of weeks or more,
but now once more has this problem.
Thanks.

Charles

/**
** Charles H. Franklin
** Professor, Political Science
** University of Wisconsin, Madison
** 1050 Bascom Mall
** Madison, WI 53706
** 608-263-2022 Office
** 608-265-2663 Fax
** mailto:[EMAIL PROTECTED] (best)
** mailto:[EMAIL PROTECTED] (alt)
** http://www.polisci.wisc.edu/~franklin
**/
__
[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] Layout of windows devices

2003-06-13 Thread Duncan Murdoch
On Fri, 13 Jun 2003 13:38:14 +0100 (BST), Prof Brian Ripley wrote:

There is already support for this in the R-devel version: it like the 
current approach assumes one screen, though.  From the CHANGES file

I just checked out the Windows docs, and it looks like the normal
setup for multiple monitors is to treat them like one big virtual
monitor.  They can also be set up completely independently, but then
most Windows functions aren't available, so I don't think we could
support that.

Pixel (0,0) is the top left of the primary monitor; other monitors
can be addressed at locations (positive or negative) beyond the limits
of the primary.

Duncan

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


[R] Programcode and data in the same textfile

2003-06-13 Thread Ernst Hansen
My request for a way of having both data and R-code in the same
textfile, resultet in a considerable number of very good suggestions,
that I will now summarize.

The boundary conditions for the problem were as follows: the data
should be written in the textfile in a format that was readable to the
human eye. And this ruled out the 'transposed' way of writing the
data, that is used in most help-files, eg. in ?model.matrix.

As the purpose of the exercise is to make the textfile easy to read,
there is a limit to how complicated the extra code should be -
otherwise it would make matters worse.   I don't know if any of the
solutions below qualify in this sense - but I surely learned a lot
from them.






The most popular idea was using textConnection() in a combination with
read.table().  For instance Thomas Hotz wrote it like


# Solution by Thomas Hotz

   MyFrame - read.table(textConnection(c(

'SexRespons',
'Male   1',
'Male   2',
'Female 3',
'Female 4'

   )), header = T)


Gabor Grothendieck had a similar solution. James Holtman provided a
nifty trick to get rid of the strategically placed commas and
quotations, using escaped carriagereturns,

# Solution by James Holtman

   MyFrame - read.table(textConnection('\
SexRespons \
Male   1 \
Male   2 \
Female 3 \
Female 4 \
   '), header = T, skip = 1)
 

Duncan Temple Lang suggested that the entire textfile should be
wrapped up as XML, and parsed via the XML package.  In the context of
me and my students, I think that this would be overkill, and I also
think it necessarily breaks the one-file boundary condition, but in a
larger context it seems like an excellent advise.

# Solution by Duncan Tempel Lang

# Content of myFile.q
   doc
   data
SexResponse
Male   1
Male   2
Female 3
Female 4
   /data

   code
..
   /code
   /doc

To read the data,

 tr = xmlRoot(xmlTreeParse(myFile.q))
 read.table(textConnection(xmlValue(tr[[data]])), header=TRUE)

and to access the code text

 xmlValue(tr[[code]])




A number of approaches not based on textConnection() emerged, though.

Torsten Hothorn suggested that the data should be surrounded by some
kind of  print-statement, writing it to a temporary file.  Then
read.table() could be used to retrieve the data:

# Torsten Hothorns solution:

  tmpfilename - tempfile()
  tmpfile - file(tmpfilename, 'w')
  cat(
  'SexRespons',
  'Male   1',
  'Male   2',
  'Female 3',
  'Female 4',
  file = tmpfile, sep='\n')
  close(tmpfile)
  read.table(tmpfilename, header = TRUE)



Barry Rowlingson suggested that the data should be written as a vector
of characters, and then shaped by hand:

# Barry Rowlingsons solution

   data - c(

 'Sex', 'Respons',
 'Male',   1,
 'Female', 2,
 'Male',   3,
 'Male',   2,

 )

   ncol - 2
   nrow - length(data)/ncol

   heads - data[1:ncol];data - data[-(1:ncol)]
   asDF - data.frame(matrix(data,ncol=ncol,byrow=T))

   asDF[,2] - as.numeric(asDF[,2])
   names(asDF) - heads


Finally, Thomas Blackwell and Greg Louis implemented a nice idea,
where the data are commented out in the textfile, but where a call to
read.table() from within the file, makes it read exactly those lines,
using a different convention for comments:

# Greg Louis' solution

   MyFrame - read.table('myFile.q', header = T, 
  skip = 28, nrows = 4, comment.char=)[-1]
   # SexRespons 
   # Male   1 
   # Male   2 
   # Female 3 
   # Female 4 

Exactly how lines that will need to be skipped depends on the
circumstances. nrows is the number of cases in the dataframe. 
 


The original request follows below.

Thank you all for participating.


Ernst Hansen
Department of Statistics
University of Copenhagen




Ernst Hansen writes:
  I have the following problem.  It is not of earthshaking importance,
  but still I have spent a considerable amount of time thinking about
  it. 
  
  PROBLEM: Is there any way I can have a single textfile that contains
  both
  
a) data
  
b) programcode
  
  The program should act on the data, if the textfile is source()'ed
  into R.
  
  
  BOUNDARY CONDITION: I want the data written in the textfile in exactly
  the same format as I would use, if I had data in a separate textfile,
  to be read by read.table().  That is, with 'horizontal inhomogeneity'
  and 'vertical homogeneity' in the type of entries.  I want to write
  something like 
  
SexRespons
Male   1
Male   2
Female 3
Female 4
  
  In effect, I am asking if there is some way I can convince
  read.table(), that the data is contained in the following n lines of
  text. 
  
  
  ILLEGAL SOLUTIONS:
  I know I can simulate the behaviour by reading the columns of the
  dataframe one by one, and using data.frame() to glue them together.
  Like in 
  
  data.frame(Sex = c('Male', 'Male', 

[R] RDCOM Client: processes not terminating

2003-06-13 Thread David Khabie-Zeitoune
Hello

I am using Duncan Lang's RDCOM Client package (available on
omegahat.org) under R 1.7.0 and Windows XP Pro. 

Is this the right forum for questions about this package? In case it is,
here is my question: 

Instances of COM objects do not seem to terminate as expected, but leave
residual processes running. For example, if I try the simple example:

E - COMCreate(Excel.Application)
E[[Visible]] - TRUE
E$Quit()

An Excel application is created and pops up visibly. The E$Quit()
command appears to close the application down as expected, but an EXCEL
process is still left running in the background (as indicated by e.g.
the Windows Task Manager).

Is there a way to cleanly exit the COM instance and shut down the
associated process? 

Thanks,

David

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


Re: [R] breaks

2003-06-13 Thread David Brahm
Martin Maechler [EMAIL PROTECTED] wrote:
 findInterval()

Hi, Martin.  I wasn't aware of findInterval().  findInterval(x, vec) looks to
me very similar to:
  R cut(x, c(-Inf,vec,Inf), labels=FALSE, right=FALSE) - 1
so I'm curious what the differences are (e.g. speed, duplicates in vec?).  In
any case, findInterval() and cut() ought to be in each other's See Also,
don't you think?

R xx - c(-2.0, 1.4, -1.2, -2.2, 0.4, 1.5, -2.2, 0.2, -0.4, -0.9)
R xx.y - c(-2.200, -0.967, 0.267, 1.500)
R findInterval(xx, xx.y)
   [1] 1 3 1 1 3 4 1 2 2 2
R cut(xx, c(-Inf,xx.y,Inf), labels=FALSE, right=FALSE) - 1
   [1] 1 3 1 1 3 4 1 2 2 2
-- 
  -- David Brahm ([EMAIL PROTECTED])

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


Re: [R] lars - lasso problem

2003-06-13 Thread Thomas Lumley
On Fri, 13 Jun 2003, Martin Wegmann wrote:

 hello Berwin,

 thanks for your help, I haven't considered this x-naming problem (pretty
 stupid mistake :-) ) - now it is working.


Because I can't keep track of this sort of thing I like to use with()
rather than attach() when there isn't a data= argument.

  x-with(diabetes, lars(x,y))

doesn't cause the same problem.

-thomas

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


Re: [R] Using jpeg() function over cgi

2003-06-13 Thread Prof Brian Ripley
Yes, it has been solved and discussed in the R-help archives many times.
The help(jpeg) page is pretty explicit too.  One alternative is bitmap().

To use jpeg() under a Unix-alike you need to set up an X server that your
R process can use.  It's a bit hard to help you do that when you don't
even mention your OS (I am inferring it is a Unix-alike), but you may be
able to solve the permissions problem or you may be able to set by a
server by something like Xvfb.  In any case, it is not an R problem


On Fri, 13 Jun 2003, michael watson (IAH-C) wrote:

 I have seen a few posts to this list regarding problems accessing the
 x11() device over cgi - namely, when trying to create a graphic using

No, not the x11() device, but the jpeg() device.  They are not the same!

 the jpeg() function, everything is fine from the command line but it
 won't work over cgi, producing the error:
 
 Unable to open connection to X11 display
 
 Has anyone actually solved this particular problem satisfactorily?
 
 Please reply direct to me as I am not a member of the list (yet!)


-- 
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] maps library for R?

2003-06-13 Thread Angel -
Hi there,
Does it already exist a library in R to draw maps (something like a Generic 
Mapping Toolbox, http://gmt.soest.hawaii.edu/ port).

I've seen in an old R-help that Ross Ihaka once tried to port the S-plus map 
library (http://maths.newcastle.edu.au/~rking/R/help/99b/0832.html ).
Anybody know if this package is available somewhere or if there is somebody 
developing a Mapping package for R. I'll might then try to help.
Cheers,
Angel

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


Re: [R] probe design

2003-06-13 Thread Laurent Gautier
On Fri, Jun 13, 2003 at 03:56:47PM +0200, Kurt Sys wrote:
 Hello,
 
 this is a quite specific topic, but I just wonder if there are some R
 packages present for 'probe design'.
 
 tnx,
 Kurt.
 
 
 -- 
 All art is but imitation of nature.
   -- Lucius Annaeus Seneca
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help

What do you mean by probe design ? Are you referring to microarrays ?
-- 
--
currently at the National Yang-Ming University in Taipei, Taiwan
--
Laurent Gautier CBS, Building 208, DTU
PhD. StudentDK-2800 Lyngby,Denmark  
tel: +45 45 25 24 89http://www.cbs.dtu.dk/laurent

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


Re: [R] problem with latex of object summary reverse

2003-06-13 Thread Frank E Harrell Jr
On Fri, 13 Jun 2003 20:13:02 +0700
Philippe Glaziou [EMAIL PROTECTED] wrote:

 Hi,
 
 I have the following problem (library Hmisc loaded, 
 iris data loaded, R Version 1.7.0  (2003-04-16), packages 
 updated, running on a linux Debian i386):
 
  summary(Species~Sepal.Length,method=reverse)-a
  a
 
 
 Descriptive Statistics by Species
 
 ++-+-+-+
 ||setosa   |versicolor   |virginica
 |
 ||(N=50)   |(N=50)   |(N=50)
 |
 ++-+-+-+
 |Sepal.Length|4.800/5.000/5.200|5.600/5.900/6.300|6.225/6.500/6.900|
 ++-+-+-+
 
 
  latex(a)-la
 
 
 works ok, but the a.tex generated file is wrong: a '' is
 missing on the line ending with ' wrong', resulting in the
 (N=50) of the second row being put on the first column, like:
 
 ++-+-+-+
 ||setosa   |versicolor   |virginica
 |
 |(N=50)  |(N=50)   |(N=50)   |
 |
 ++-+-+-+
 |Sepal.Length|4.800/5.000/5.200|5.600/5.900/6.300|6.225/6.500/6.900|
 ++-+-+-+
 
 
 
  system(cat a.tex)
 
 
 % latex.default(cstats, title = title, caption = caption,
 rowlabel = rowlabel,  col.just = col.just,
 numeric.dollar = FALSE, insert.bottom = legend,  rowname
 = lab, dcolumn = dcolumn, extracolheads = extracolheads,
 extracolsize = Nsize, ...) 
 %
 \begin{table}[!tbp]
  \begin{center}
  \caption{Descriptive Statistics by Species\label{a}} 
  \begin{tabular}{lccc}\hline\hline
 \multicolumn{1}{l}{}
 \multicolumn{1}{c}{setosa}
 \multicolumn{1}{c}{versicolor}
 \multicolumn{1}{c}{virginica}
 \\   \multicolumn{1}{l}{{\scriptsize    wrong
 $N=50$}}\multicolumn{1}{c}{{\scriptsize
 $N=50$}}\multicolumn{1}{c}{{\scriptsize $N=50$}}\\ \hline
 Sepal.Length{\scriptsize 4.800~}{5.000 }{\scriptsize 5.200}
 {\scriptsize 5.600~}{5.900 }{\scriptsize 6.300}
 {\scriptsize 6.225~}{6.500 }{\scriptsize 6.900} \\
 
 [...]
 
 
 
 Any idea about what I might be doing wrong here? I can
 reproduce that problem with summary(method=reverse) on
 other datasets, and various combinations of options passed
 to the latex command. 
 
 Thanks
 
 -- 
 Philippe
 

I tried this on the latest version of Hmisc (1.6-0):

library(Hmisc)
set.seed(1)
y - factor(sample(c('a','b','c'),100,T))
x - runif(100)
a - summary(y ~ x, method='reverse')
options(digits=3)
latex(a)

and everything was fine.   The following also worked:

data(iris)
a - summary(Species~Sepal.Length, method='reverse',data=iris)
latex(a)

See if a bug fix in Hmisc has fixed your problem since the last time you updated the 
package. 

---
Frank E Harrell Jr  Prof. of Biostatistics  Statistics
Div. of Biostatistics  Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat

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


Re: [R] breaks

2003-06-13 Thread Martin Maechler
 DavidB == David Brahm [EMAIL PROTECTED]
 on Fri, 13 Jun 2003 10:56:29 -0400 writes:

DavidB Martin Maechler [EMAIL PROTECTED] wrote:
 findInterval()

DavidB Hi, Martin.  I wasn't aware of findInterval().  findInterval(x, vec) looks 
to
DavidB me very similar to:
R cut(x, c(-Inf,vec,Inf), labels=FALSE, right=FALSE) - 1

DavidB so I'm curious what the differences are (e.g. speed,
DavidB duplicates in vec?).  In any case, findInterval()
DavidB and cut() ought to be in each other's See Also,
DavidB don't you think?

When I wrote the precursor of findInterval() about 10 years ago (to be
dyn.load()ed into S-plus), I hadn't yet realized about the
several alternatives.  

However, when I added it to R, I knew about the N*ecdf()
alternative, i.e., ecdf() from package:stepfun which relies on
approx(., method = constant).
I found that findInterval() was slightly faster than approx()
even for unsorted `x' (by about a factor of 2 for large `vec') in my
test cases, but the real speed of findInterval() comes to play
when `x' is sorted -- something which is very typical e.g. for
evaluation of piecewise functions (splines etc).

R xx - c(-2.0, 1.4, -1.2, -2.2, 0.4, 1.5, -2.2, 0.2, -0.4, -0.9)
R xx.y - c(-2.200, -0.967, 0.267, 1.500)
R findInterval(xx, xx.y)
DavidB [1] 1 3 1 1 3 4 1 2 2 2
R cut(xx, c(-Inf,xx.y,Inf), labels=FALSE, right=FALSE) - 1
DavidB [1] 1 3 1 1 3 4 1 2 2 2

cut() is still slower than the ecdf() / approx() version
considerably for long `vec'  ...
I really should write a small article about this for R News,
where I'd also show the simulation results...

Martin Maechler [EMAIL PROTECTED] http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16Leonhardstr. 27
ETH (Federal Inst. Technology)  8092 Zurich SWITZERLAND
phone: x-41-1-632-3408  fax: ...-1228   

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


[R] Using PCA

2003-06-13 Thread Eugenij P. Altshuler
Dear R-help! I ask you to help me with my problems with using R.
First, I ask you to forgive my bad English!
I try to use R in my study.
Subject of my work is comparative study of flora of lakes in different
regions of Russia. I have done floristical descriptions of 152 lakes (I
think it's enough) and have tabulated it. As data I have a table, such has
152 rows (lakes) 290 variables (species of plants). Thus, there is frequency
of species of plants in every cell of this table. I wanted to search some
groups between these lakes. I have done this searching with cluster analysis
(cutree(hclust(dist(DATA,manh),ward),4)). Then I apply principal
component analysis:
==
##loading data (DATA)
##loading the list of groups (GROUPS)
d.prc-princomp(DATA)
palette(rainbow(length(unique(GROUPS
plot(d.prc$scores,type=n,main=Principal Component
Analysis,xlab=Different groups of lakes have different color-labeling)
text(d.prc$scores,labels=GROUPS,col=GROUPS,cex=.6)
==
I have received attached plot as a result. Both I and my supervisor of
studies are agree with clustering. You can see 4 groups in this figure.
Write to me please your opinion, if these groups are authentic. Could you
present any criteria of existence of distinguishable groups and any criteria
of allocation of these groups?
Can I use PCA as instrument to test visually clustering?
I heard some opinion: PCA is for visual allocating of the groups and then
you can search hypothetical parameter to explain groupping. But you cannot
use PCA for looking for the loadings (influence) of variables on the
groupping. Is it true?
Could you advise to me some other methods to analyze.

---

Best wishes,
Altshuler Eugenij P.
mailto:[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] maps library for R?

2003-06-13 Thread Roger Bivand
On Fri, 13 Jun 2003, Angel - wrote:

 Does it already exist a library in R to draw maps (something like a Generic 
 Mapping Toolbox, http://gmt.soest.hawaii.edu/ port).
 
 I've seen in an old R-help that Ross Ihaka once tried to port the S-plus map 
 library (http://maths.newcastle.edu.au/~rking/R/help/99b/0832.html ).
 Anybody know if this package is available somewhere or if there is somebody 
 developing a Mapping package for R. I'll might then try to help.
 Cheers,
 Angel
 

As of now, there is a source package published on CRAN (RArcInfo) which 
reads Arc binary data, and has a map function. Off CRAN, there are a 
number of draft packages, some of which are linked to the web-page of a 
pre-conference workshop here:

http://spatial.nhh.no/meetings/vienna/index.html

This work is continuing on several levels:

1) data import/export

2) mapping

3) projection, line thinning/generalisation, topology

4) interfacing mapping functions with spatial analysis functions

Contributions and ideas welcome! 

Roger

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

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


[R] building RPMs for R packages

2003-06-13 Thread Cooper Bethea
hi all-

apologies if this question has come up before; i took a swing through a
few months of archives and didn't turn anything up.

i'm a linux systems administrator, and we're running R across a beowulf
cluster. i've been asked to install the bioconductor package, for which
i can't find RPMs. the recommended way to do this on the bioconductor
home page is via R CMD INSTALL, which seems to be the standard way to
install R packages.

however, i want to make an RPM out of bioconductor, since i have to
deploy it to 48 machines and i want rpm to track the versioning and
dependencies. also, the machines are very homogenous and there's no
reason compilation should occur on each.

so could someone who's built R extension RPM packages give me some
pointers? a SRPM for a package would be invaluable.

thanks for your time.

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


[R] Problem with Rcmd SHLIB

2003-06-13 Thread Remko Duursma
Dear R-helpers,

i am trying to make a shared library from a Fortran subroutine, and i therefore used 
(after reading the documentation):

Rcmd SHLIB forfile.f  #(R1.70, Win2000)

And the error is:
  'perl' is not recognized as an internal or external command,operable program or 
batch file. 

So i went ahead and tried to install Perl (from the suggested website in 
readme.packages) but the installer told me i already had Perl installed!
By the way,

Rcmd COMPILE somefile.f  

gives the same error message.

What am i missing?

Thanks,

Remko


^'~,_,~'^'~,_,~'^'~,_,~'^'~,_,~'^'~,_,~'^'~,_,~'
Remko Duursma, Ph.D. student
Forest Biometrics Lab / Idaho Stable Isotope Lab
University of Idaho, Moscow, ID, U.S.A.

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


[R] Aluma Floor - New High Tech Floor of THE FUTURE!

2003-06-13 Thread Aluma Floor
Aluminum Flooring New To The Market
http://www.aluminumfloors.com  __
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] problem installing packages from source on win2k

2003-06-13 Thread Simon Cawley

Dear R-helpers,

I'm having trouble compiling R packages from source on Win2K.  I installed R 1.7.1beta 
[1] on my win2k machine [2], downloaded the fields package as source [3] and tried but 
failed to install the package [4].  I get the same problem with other packages, so it 
doesn't appear to be limited to fields.  Installation of precompiled packages seems to 
work fine.  I've been doing this on linux for a long time and never ran into such an 
issue.

I've trawled the FAQ and the archives but I'm not finding anything.  Any clues where 
I'm going wrong?

Thanks in advance,

-Simon

##

Notes:

[1] Version of R: 1.7.1 Beta, obtained from 
http://www.stats.uwo.ca/faculty/murdoch/software/r-devel/rw1071beta.exe on 6-13-2003

[2] Output from version:
  platform i386-pc-mingw32
  arch i386   
  os   mingw32
  system   i386, mingw32  
  status   Beta   
  major1  
  minor7.1
  year 2003   
  month06 
  day  06 
  language R  

[3] fields 1.3.1 package downloaded from 
http://cran.stat.ucla.edu/src/contrib/fields_1.3-1.tar.gz.

[4] within cygwin bash shell, I ran the following:
  Rcmd install fields_1.3-1.tar.gz
which dies with the error
.
hhc: not found
cp: cannot stat `c:/tmp/R.INSTALL/fields/chm/fields.chm': No such file or directory
make[1]: *** [chm-fields] Error 1
make: *** [pkg-fields] Error 2
*** Installation of fields failed ***

See below for full log of stdout and stderr from the installation attempt.

#

STDERR:

cvrcss.f: In subroutine `cvrcss':
cvrcss.f:61: warning: `cvmin' might be used uninitialized in this function
cvrcss.f:63: warning: `best' might be used uninitialized in this function
cvrcss.f:65: warning: `trbest' might be used uninitialized in this function
gcvcss.f: In subroutine `gcvcss':
gcvcss.f:59: warning: `gcvmin' might be used uninitialized in this function
gcvcss.f:61: warning: `best' might be used uninitialized in this function
gcvcss.f:63: warning: `trbest' might be used uninitialized in this function
gcvfc.f: In function `gcvfc':
gcvfc.f:18: warning: unused variable `rinf'
rkmat.f: In subroutine `rkbesl':
rkmat.f:212: warning: `itemp' might be used uninitialized in this function
hhc: not found
cp: cannot stat `c:/tmp/R.INSTALL/fields/chm/fields.chm': No such file or directory
make[1]: *** [chm-fields] Error 1
make: *** [pkg-fields] Error 2

#

STDOUT:

-- Making package fields 
  adding build stamp to DESCRIPTION
  making DLL ...
g77 -O2 -Wall  -c css.f -o css.o
g77 -O2 -Wall  -c csstr.f -o csstr.o
g77 -O2 -Wall  -c cvrcss.f -o cvrcss.o
g77 -O2 -Wall  -c cvrf.f -o cvrf.o
g77 -O2 -Wall  -c dchold.f -o dchold.o
g77 -O2 -Wall  -c dcopy.f -o dcopy.o
g77 -O2 -Wall  -c ddot.f -o ddot.o
g77 -O2 -Wall  -c dlv.f -o dlv.o
g77 -O2 -Wall  -c dmaket.f -o dmaket.o
g77 -O2 -Wall  -c drdfun.f -o drdfun.o
g77 -O2 -Wall  -c dsetup.f -o dsetup.o
g77 -O2 -Wall  -c expbs.f -o expbs.o
g77 -O2 -Wall  -c expfn.f -o expfn.o
g77 -O2 -Wall  -c gaspbs.f -o gaspbs.o
g77 -O2 -Wall  -c gaspfn.f -o gaspfn.o
g77 -O2 -Wall  -c gcvcss.f -o gcvcss.o
g77 -O2 -Wall  -c gcvfc.f -o gcvfc.o
g77 -O2 -Wall  -c hsort.f -o hsort.o
g77 -O2 -Wall  -c ifind.f -o ifind.o
g77 -O2 -Wall  -c inpoly.f -o inpoly.o
g77 -O2 -Wall  -c lscv.f -o lscv.o
g77 -O2 -Wall  -c m2deb.f -o m2deb.o
g77 -O2 -Wall  -c mkpoly.f -o mkpoly.o
g77 -O2 -Wall  -c mltdrb.f -o mltdrb.o
g77 -O2 -Wall  -c mltdtd.f -o mltdtd.o
g77 -O2 -Wall  -c msort.f -o msort.o
g77 -O2 -Wall  -c multeb.f -o multeb.o
g77 -O2 -Wall  -c multgb.f -o multgb.o
g77 -O2 -Wall  -c multrb.f -o multrb.o
g77 -O2 -Wall  -c nkden.f -o nkden.o
g77 -O2 -Wall  -c nkreg.f -o nkreg.o
g77 -O2 -Wall  -c nvden.f -o nvden.o
g77 -O2 -Wall  -c radbas.f -o radbas.o
g77 -O2 -Wall  -c radfun.f -o radfun.o
g77 -O2 -Wall  -c rcss.f -o rcss.o
g77 -O2 -Wall  -c rcssr.f -o rcssr.o
g77 -O2 -Wall  -c rcsswt.f -o rcsswt.o
g77 -O2 -Wall  -c rkmat.f -o rkmat.o
g77 -O2 -Wall  -c sortm.f -o sortm.o
ar cr fields.a *.o
ranlib fields.a
windres --include-dir c:/PROGRA~1/R/RW1071~1/src/include  -i fields_res.rc -o 
fields_res.o
gcc  --shared -s  -o fields.dll fields.def fields.a fields_res.o  
-Lc:/PROGRA~1/R/RW1071~1/src/gnuwin32  -lg2c -lR 
  ... DLL made
  installing R files
  installing data files
  installing man source files
  installing indices
  not zipping data
  installing help
  Building/Updating help pages for package 'fields'
 Formats: text html latex example 
  BDtexthtmllatex   example
  Krig  texthtmllatex   example
  Tps   texthtmllatex   example
  UStexthtmllatex   example
  US.dattexthtmllatex
  Wtransform.image  texthtmllatex   example
  Wtransform.sim  

Re: [R] problem installing packages from source on win2k

2003-06-13 Thread Marc Schwartz
On Fri, 2003-06-13 at 19:02, Simon Cawley wrote:
 Dear R-helpers,
 
 I'm having trouble compiling R packages from source on Win2K.  I
 installed R 1.7.1beta [1] on my win2k machine [2], downloaded the
 fields package as source [3] and tried but failed to install the
 package [4].  I get the same problem with other packages, so it
 doesn't appear to be limited to fields.  Installation of precompiled
 packages seems to work fine.  I've been doing this on linux for a long
 time and never ran into such an issue.
 
 I've trawled the FAQ and the archives but I'm not finding anything. 
 Any clues where I'm going wrong?
 
 Thanks in advance,
 
 -Simon
 
 ##

...Lengthy notes SNIPPED

Simon, 

Unless I am missing something here, I think that you are making this
more difficult than you need to.

Thanks I believe to Uwe Ligges, there appears to be a version of the
fields package already compiled for R 1.7.x on Windows at:

http://cran.r-project.org/bin/windows/contrib/1.7/fields_1.3-1.zip

Is there a reason that you cannot use this?

HTH,

Marc Schwartz

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


RE: [R] problem installing packages from source on win2k

2003-06-13 Thread Liaw, Andy
 From: Simon Cawley [mailto:[EMAIL PROTECTED] 
 
 Dear R-helpers,
 
 I'm having trouble compiling R packages from source on Win2K. 
  I installed R 1.7.1beta [1] on my win2k machine [2], 
 downloaded the fields package as source [3] and tried but 
 failed to install the package [4].  I get the same problem 
 with other packages, so it doesn't appear to be limited to 
 fields.  Installation of precompiled packages seems to work 
 fine.  I've been doing this on linux for a long time and 
 never ran into such an issue.
 
[snip]

 [4] within cygwin bash shell, I ran the following:
   Rcmd install fields_1.3-1.tar.gz
 which dies with the error
 .
 hhc: not found
 cp: cannot stat `c:/tmp/R.INSTALL/fields/chm/fields.chm': No 
 such file or directory
 make[1]: *** [chm-fields] Error 1
 make: *** [pkg-fields] Error 2
 *** Installation of fields failed ***

A couple of things:

1.  I believe the build need to be done from a command prompt (a.k.a.
MSDOS), rather than the cygwin bash.  The potential problem (at least the
one I know about) is that the cygwin bash by default prepends it's own PATH
to the system PATH, so it will find the cygwin compilers first before the
minGW.

2.  The error message is quite clear: it can't find hhc.exe.  That's the
Compiled HTML help compiler (for CHM help pages).  Either install it and put
it in the path, or find the Makefile/MkRules and tell it not to make CHM.

HTH,
Andy

--
Notice: This e-mail message, together with any attachments, cont... {{dropped}}

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


Re: [R] maps library for R?

2003-06-13 Thread Ray Brownrigg
 Does it already exist a library in R to draw maps (something like a Generic 
 Mapping Toolbox, http://gmt.soest.hawaii.edu/ port).
 
 I've seen in an old R-help that Ross Ihaka once tried to port the S-plus map 
 library (http://maths.newcastle.edu.au/~rking/R/help/99b/0832.html ).
 Anybody know if this package is available somewhere or if there is somebody 
 developing a Mapping package for R. I'll might then try to help.

There are two, but AFAIK neither of them will work on Windows.  My port
of the basic S maps package (no projections) has recently been modified
to provide a small (700KB) 'base' package with limited maps data (just
usa, state, counties, nz and world.thin), plus an add-on package called
mapdata (24MB) with the high-resolution maps. [This split has not yet
been fully tested, and requires maps to be *installed* before mapdata,
and mapdata must be installed in the same library directory as maps.]

These are available from
ftp://ftp.mcs.vuw.ac.nz/pub/statistics/map/map*_1.1-0*

The other solution in development is called Rmap from Barry Rowlingson
(http://www.maths.lancs.ac.uk/Software/Rmap/), but as I understand it,
this requires quite a lot of third-party stuff to be installed first.

Ray Brownrigg

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


Re: [R] problem installing packages from source on win2k

2003-06-13 Thread Duncan Murdoch
On Fri, 13 Jun 2003 17:02:07 -0700 (PDT), you wrote:


Dear R-helpers,

I'm having trouble compiling R packages from source on Win2K. 
 ...
  Rcmd install fields_1.3-1.tar.gz
which dies with the error
.
hhc: not found

That's the Microsoft help compiler.  You can probably do a build
without it; you'll need to define WINHELP to NO instead of the default
CHM.  

Duncan Murdoch

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


Re: [R] problem with latex of object summary reverse

2003-06-13 Thread Philippe Glaziou
Frank E Harrell Jr [EMAIL PROTECTED] wrote:
 I tried this on the latest version of Hmisc (1.6-0):
 
 library(Hmisc)
 set.seed(1)
 y - factor(sample(c('a','b','c'),100,T))
 x - runif(100)
 a - summary(y ~ x, method='reverse')
 options(digits=3)
 latex(a)
 
 and everything was fine.   The following also worked:
 
 data(iris)
 a - summary(Species~Sepal.Length, method='reverse',data=iris)
 latex(a)
 
 See if a bug fix in Hmisc has fixed your problem since the
 last time you updated the package.


Sorry to bother you again, I use the latex command with
Sweave, and I would like to see the reports come out well
without manual interventions on some tex files. 

My Hmisc package version is also 1.6-0, and your first
example gives me the same problem: the first N on the second
row goes into the first column instead of the second one,
all the other Ns are one column to the left of the column
where they should appear, although the summary command
prints ok within R. Also, \multicolumn{} inherits the
position parameter {l} of the remaining of the first 
column, rather than for instance {c} if it where on the
second column.  The remaining of the latex table is right.

Are there any unix tools or latex styles called by your
programmes, that I should check on my system?

Below is the latex compilation output that appears after 
the command latex(a) of your first example. 



  This is TeX, Version 3.14159 (Web2C 7.3.7)
  (/tmp/Rtmp1996/file66334873.tex LaTeX2e 2001/06/01 Babel
  v3.7h and hyphenation patterns for american, french,
  german, ngerman, n ohyphenation, loaded.
  (/usr/share/texmf/tex/latex/base/report.cls Document Class:
  report 2001/04/21 v1.4e Standard LaTeX document class
  (/usr/share/texmf/tex/latex/base/size10.clo))
  (/usr/share/texmf/tex/latex/misc/geometry.sty
  (/usr/share/texmf/tex/latex/graphics/keyval.sty)
  (/usr/share/texmf/tex/latex/config/geometry.cfg)) No file
  file66334873.aux.
  
  Underfull \hbox (badness 1) in paragraph at lines 19--20
  
  [1] (./file66334873.aux)
  
  LaTeX Warning: Label(s) may have changed. Rerun to get
  cross-references right.
  
   )
  (see the transcript file for additional information)
  Output written on file66334873.dvi (1 page, 760 bytes).
  Transcript written on file66334873.log.



Thanks for your help,

-- 
Philippe

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


Re: [R] problem installing packages from source on win2k

2003-06-13 Thread Duncan Murdoch
On Fri, 13 Jun 2003 21:35:22 -0400, you wrote:



1.  I believe the build need to be done from a command prompt (a.k.a.
MSDOS), rather than the cygwin bash.  The potential problem (at least the
one I know about) is that the cygwin bash by default prepends it's own PATH
to the system PATH, so it will find the cygwin compilers first before the
minGW.

You need to adjust the path in either case.  I do builds in Cygwin
now; the path is set in /etc/profile.   Since I don't have the Cygwin
compilers installed, finding them first is not an issue.

Duncan Murdoch

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


Re: [R] Problem with Rcmd SHLIB

2003-06-13 Thread Ko-Kang Kevin Wang
Hi,

Is perl in your Path?  i.e. what happens when you type:
  perl --version

On Fri, 13 Jun 2003, Remko Duursma wrote:

 Date: Fri, 13 Jun 2003 14:54:40 -0700
 From: Remko Duursma [EMAIL PROTECTED]
 To: rhelp [EMAIL PROTECTED]
 Subject: [R] Problem with Rcmd SHLIB 
 
 Dear R-helpers,
 
 i am trying to make a shared library from a Fortran subroutine, and i therefore used 
 (after reading the documentation):
 
 Rcmd SHLIB forfile.f  #(R1.70, Win2000)
 
 And the error is:
   'perl' is not recognized as an internal or external command,operable program or 
 batch file. 
 
 So i went ahead and tried to install Perl (from the suggested website in 
 readme.packages) but the installer told me i already had Perl installed!
 By the way,
 
 Rcmd COMPILE somefile.f  
 
 gives the same error message.
 

-- 
Cheers,

Kevin

--
On two occasions, I have been asked [by members of Parliament],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will
the right answers come out?' I am not able to rightly apprehend the
kind of confusion of ideas that could provoke such a question.

-- Charles Babbage (1791-1871) 
 From Computer Stupidities: http://rinkworks.com/stupid/

--
Ko-Kang Kevin Wang
Master of Science (MSc) Student
SLC Tutor and Lab Demonstrator
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
Ph: 373-7599
x88475 (City)
x88480 (Tamaki)

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