Re: [R] loess

2004-05-25 Thread Prof Brian Ripley
On Tue, 25 May 2004, Rupen Shrestha wrote:

 When I was running the function loess(y~x, span=0.0020), I got a warning 
 message k-d tree limited by memory. ncmax= 4231
 
 Does that mean the function has not been computed correctly ? If it has not, 
 is there any way to adjust it so that it will do correctly ?

It was computed a little inaccurately.  You can alter many things: see
?loess.control, especially its first item. *However*, that span is so
small that this makes little sense, with too few neighbours for any 
visually apparent smoothing.


-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] yeardays

2004-05-25 Thread Prof Brian Ripley
On Tue, 25 May 2004, Steve Su wrote:

 Is there a R (Windows) equivalent of yeardays in Splus 6.0 for Windows?
 I am using XP.

You could tell us what that did ... that version of S-PLUS (sic) is long 
obselete and most readers will not have access to it (or any other recent 
version of S-PLUS).

It would appear to be one plus the yday component of a POSIXlt object, so

as.POSIXlt(x)$yday + 1

should be equivalent.  See ?months for relevant comments.

-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Scheire-Ray-Hare extension to Kruskal-Wallis

2004-05-25 Thread Peter Dalgaard
Sarah Skikne [EMAIL PROTECTED] writes:

 Hi,
 
 I was wondering if it was possible to do the Scheirer-Ray-Hare
 extension of the Kruskal-Wallis test using R, or if it was possible
 to use some other non-parametric test for the following situation:
 
 I have continuous data that is grouped by 2 factor variables. I
 would like a non-parametric test because the group variances are not
 equal. I would like to look for the effects of either factor
 variable and their interaction.

It is a common misconception that nonparametric tests do not assume
equal variances. In fact, they generally assume that entire
distributions are the same (under the null hypothesis). Testing for
interactions also pretty much assumes effects are on a particular
scale, which is not really very different from making parametric
assumptions. I'd consider a weighted linear model in such cases,
possibly supplemented by simulation or bootstrapping to get an
improved estimate of the p-values etc.

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

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


[R] vectorize an expression

2004-05-25 Thread Robin Hankin
Hi guys.  Another thing I cannot vectorize:
I have an array a, of size 5-by-2, for example, of 5 2D vectors.  I
also have a distance function that computes the distance between two
vectors (usual Euclidean distance is a good example but I have other metrics I
want to use as well).  I want a 5-by-5 array with the [i,j]th element being
 the distance from a[i,] to a[j,]
To Wit:
  a - matrix(1:10,5,2)
  array - matrix(NA, 5, 5)
  dist - function(x1,x2){sqrt(sum(x1-x2)^2)}
  #NONVECTORIZED BIT FOLLOWS
  for(i in 1:5) {
for(j in 1:5) {
  array[i,j] - dist(a[i,] , a[j,])
}
  }
(note that array[i,i]=0 for i=1:5 as expected).
How to vectorize this?
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
[EMAIL PROTECTED] (edit in obvious way; spam precaution)
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Hiding internal package functions for the doc. pkg-internal.Rd

2004-05-25 Thread Henrik Bengtsson
Add \keyword{internal} to the Rd files you would like to hide from the
index. From section Documenting functions in Writing R Extensions (for
R v1.9.0):

\keyword{key}
  Each \keyword entry should specify one of the standard keywords (as
listed in the file R_HOME/doc/KEYWORDS.db). There must be at least one
\keyword entry, but can be more that one if the R object being documented
falls into more than one category.

 The special keyword 'internal' marks a page of internal objects that are
not part of the packages' API. If the help page for object foo has keyword
internal, then help(foo) gives this help page, but foo is excluded from
several object indices, like the alphabetical list of objects in the HTML
help system.

Cheers

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
+46 46 2229611 (off), +46 708 909208 (cell), +46 46 2224623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/

On Tue, 25 May 2004, Wolski wrote:

 Hallo!

 I would like that the internal package functions  does not appear in the 
 documentation.
 I placed they names as aliases in the file nameofmypackage-internal.Rd as advised.

 After R CMD check (which runs neatly) they are still listed in 00Index.html.

 Is there no way to hide internal functions from the doc?
 Have I overlook something?

 Sincerely Eryk.



 Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic
 Ihnestrasse 63-73 14195 Berlin   'v'
 tel: 0049-30-83875219   /   \
 mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


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


[R] Histogram

2004-05-25 Thread Cristian Pattaro
Dear all,

I have a surprising problem with the representation of frequencies in a 
histogram.

Consider, for example, the R code:

b-rnorm(2000,3.5,0.3)
hist(b,freq=F)

When I plotted the histogram, I expected that values in the y-axis (the 
probability) varied between 0 and 1. Instead, they varied within the 
range 0-1.3.

Have you got any suggestion for obtaining a correct graph with 
probability within the range 0-1?

Thank you very much!

Bests
/Cristian/

=
Cristian Pattaro
=
Unit of Epidemiology  Medical Statistics
Department of Medicine and Public Health
University of Verona

http://biometria.univr.it
[EMAIL PROTECTED]
=


[[alternative HTML version deleted]]

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


Re: [R] Histogram

2004-05-25 Thread Uwe Ligges
Cristian Pattaro wrote:
Dear all,
I have a surprising problem with the representation of frequencies in a 
histogram.

Consider, for example, the R code:
b-rnorm(2000,3.5,0.3)
hist(b,freq=F)
When I plotted the histogram, I expected that values in the y-axis (the 
probability) varied between 0 and 1. Instead, they varied within the 
range 0-1.3.

Have you got any suggestion for obtaining a correct graph with 
probability within the range 0-1?

Note that width * height (and *not* the height solely) corresponds to 
the probability in a histogram.

Uwe Ligges

Thank you very much!
Bests
/Cristian/
=
Cristian Pattaro
=
Unit of Epidemiology  Medical Statistics
Department of Medicine and Public Health
University of Verona
http://biometria.univr.it
[EMAIL PROTECTED]
=
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Histogram

2004-05-25 Thread Achim Zeileis
On Tue, 25 May 2004 12:27:40 +0200 Cristian Pattaro wrote:

 Dear all,
 
 I have a surprising problem with the representation of frequencies in
 a histogram.
 
 Consider, for example, the R code:
 
 b-rnorm(2000,3.5,0.3)
 hist(b,freq=F)
 
 When I plotted the histogram, I expected that values in the y-axis
 (the probability) varied between 0 and 1. Instead, they varied within
 the range 0-1.3.

The y-axis gives the density not the probability!

And the density you are sampling from has

R dnorm(3.5, mean = 3.5, sd = 0.3)
[1] 1.329808

so you shouldn't be surprised by this.
Z

 Have you got any suggestion for obtaining a correct graph with 
 probability within the range 0-1?

 Thank you very much!
 
 Bests
 /Cristian/
 
 =
 Cristian Pattaro
 =
 Unit of Epidemiology  Medical Statistics
 Department of Medicine and Public Health
 University of Verona
 
 http://biometria.univr.it
 [EMAIL PROTECTED]
 =
 
 
   [[alternative HTML version deleted]]
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html


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


RE: [R] Histogram

2004-05-25 Thread Ted Harding
On 25-May-04 Cristian Pattaro wrote:
 I have a surprising problem with the representation of
 frequencies in a histogram.
 
 Consider, for example, the R code:
 
 b-rnorm(2000,3.5,0.3)
 hist(b,freq=F)
 
 When I plotted the histogram, I expected that values in
 the y-axis (the probability) varied between 0 and 1.
 Instead, they varied within the range 0-1.3.
 
 Have you got any suggestion for obtaining a correct graph
 with probability within the range 0-1?

It depends on the widths of the bins, since what is plotted
in the histogram when freq=F is vertically scaled so that

  sum over bins of  h*(width of bin) = 1

where h is the height of the histogram bar according to the
vertical scale. In other words, hist plots a per-bin estimate
of the probability density in the sense of amount of probability
per bin divided by width of bin. If your bin widths are narrow
(and your SD above is 0,3, so you will get quite narrow bins,
0.2 in this case) and you may well get values exceeding 1.

Exactly, indeed, as for the density of the normal distribution
itself: (1/(sqrt(2*pi)*sigma))*exp(-0.5* ... ) where small values
of sigma give density  1 near x=0.

If you need the actual value of the probabilities in the bins
(i.e. n_i/N) then you can force it by constructing a new hist
object on the lines of

  h-hist(b,freq=F)
  h$counts - h$counts/sum(h$counts)
  plot(h)

When I do this with your above example, whereas the original
gives a y-axis from 0 to 1.2 with the tallest bar at about 1.3,
plot(h) give exactly the same graph but with the y-axis
labelled from 0 to 0.25, with the tallest bar at 0.2625, which
shows the probabilities.

Best wishes,
Ted.



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 167 1972
Date: 25-May-04   Time: 12:15:20
-- XFMail --

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


Re: [R] Tramo-seats

2004-05-25 Thread Vittorio
On Monday 24 May 2004 22:07, Paul Bivand wrote:
 On Monday 24 May 2004 11:00, [EMAIL PROTECTED] wrote:
...
  Now - to start with - a first problem to solve:
 
  we have to comply with the Tramo-seats closed-source procedure
  (http://www.bde.es/informes/be/docs/dt0014e.pdf) to deal with seasonality
  of electricity monthly time-series, in line with the methodology
  officially adopted by our  National Bureau of Statistics.
 
  Searching in R-help mailing list I didn't find anything about a
  tramo-seats R version.
 
  Does anyone know of unofficial R translation of tramo-seats?
  OR What do you suggest?
 
  Vittorio


 Not an R response I'm afraid, but have you looked at Demetra
 http://forum.europa.eu.int/irc/dsis/eurosam/info/data/demetra.htm which
 appears to be an officially sponsored windows-only implementation of
 Tramo-seats and X-12 ARIMA.

 The licence is not clear from the website, but it looks free as in beer but
 probably not open source.

 Paul Bivand

Paul,
Thanks for your answer.

As a matter of fact Demetra (tramo-seats is not definetely open source!) is 
what we are currently using but, you know, this doesn't match our desire to 
move to R from many other licenced pieces of software!

Ciao
Vittorio

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


Re: [R] vectorize an expression

2004-05-25 Thread Gabor Grothendieck


apply(a,1,function(y)apply(a,1,function(x)dist(x,y)))


Robin Hankin rksh at soc.soton.ac.uk writes:

: 
: Hi guys.  Another thing I cannot vectorize:
: 
: I have an array a, of size 5-by-2, for example, of 5 2D vectors.  I
: also have a distance function that computes the distance between two
: vectors (usual Euclidean distance is a good example but I have other metrics 
I
: want to use as well).  I want a 5-by-5 array with the [i,j]th element being
:   the distance from a[i,] to a[j,]
: 
: To Wit:
: 
:a - matrix(1:10,5,2)
:array - matrix(NA, 5, 5)
:dist - function(x1,x2){sqrt(sum(x1-x2)^2)}
: 
:#NONVECTORIZED BIT FOLLOWS
:for(i in 1:5) {
:  for(j in 1:5) {
:array[i,j] - dist(a[i,] , a[j,])
:  }
:}
: 
: (note that array[i,i]=0 for i=1:5 as expected).
: 
: How to vectorize this?
:

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


[R] Tramo-seats

2004-05-25 Thread vtas
Hi,
take a look at gretl (http://gretl.sourceforge.net/), which integrates
econometrics, X-12-ARIMA, TRAMO/SEATS and R.

Vytautas Maniusis,
Vilnius University, Lithuania

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


[R] Tramo-seats support in GRETL, but not R

2004-05-25 Thread James . Callahan
On Mon, 24 May 2004 12:00:46 +0200  [EMAIL PROTECTED] wrote:

 Working  - among other things- in the field of (short  long term) 
electricity
 forecast, 
* * *
 we have to comply with the Tramo-seats closed-source procedure 
(http://www.bde.es/informes/be/docs/dt0014e.pdf)
 to deal with seasonality of electricity monthly time-series, in line 
with
 the methodology officially adopted by our  National Bureau of 
Statistics.

 Searching in R-help mailing list I didn't find anything about a 
tramo-seats
 R version. 

As a former forecaster of electric and water consumption, I too have been 
down the SAS and SPSS road. I don't know of an R interface to Tramo-seats, 
but the open-source econometric language GRETL supports Tramo-seats and is 
designed to interchange data with R. GRETL was developed by Professor Alin 
Cottrell of Wake Forest University based on Professor Ramu Ramanathan's 
ESL source code. Tramo Seats may be installed to work with GRETL.

GRETL (Gnu Regression, Econometrics and Time-series Library)
http://gretl.sourceforge.net/
[GRETL] is a cross-platform software package for econometric analysis, 
written in the C programming language. 
It is is free software. You may redistribute it and/or modify it under the 
terms of the GNU General Public License (GPL) as published by the Free 
Software Foundation.
* * *
Easy intuitive interface (now in French, Italian and Spanish as well as 
English)

or if you prefer
http://gretl.sourceforge.net/gretl_italiano.html

[GRETL] è un pacchetto software multi-piattaforma per l'analisi 
econometrica, scritto in linguaggio C. È software libero: è possibile 
redistribuirlo e/o modificarlo secondo i termini della Licenza Pubblica 
Generica GNU (GPL) pubblicata dalla Free Software Foundation.


GRETL and GNU R
http://gretl.sourceforge.net/gretl_and_R.html
From gretl, you can save the current data set in a format suitable for 
analysis using R; you also have the option (Start GNU R under gretl's 
Utilities menu) of launching an R session with the current gretl data set 
automatically loaded into R's workspace.


GRETL and Tramo Seats
http://gretl.sourceforge.net/tramo/tramo-seats.html
TRAMO stands for Time series Regression with ARIMA noise, Missing values 
and Outliers and SEATS for Signal Extraction in ARIMA Time Series. 
These programs (which are commonly used together) were developed by Victor 
Gómez and Agustín Maravall at the Bank of Spain.

The home page for these programs is at www.bde.es. To quote the 
description given there, The programs are fundamentally aimed at monthly 
or lower frequency time series. Although structured to meet the needs of 
an expert analyst, they can be reliably used in an entirely automatic 
manner. The main applications are forecasting, seasonal adjustment, 
trend-cycle estimation, construction of composite leading indicators, 
interpolation, detection and correction of outliers, estimation of special 
effects, and quality control of data.

and just for good measure...
GRETL and X12
http://gretl.sourceforge.net/x12a/x12a.html
X-12-ARIMA is the program currently used by the U.S. Census Bureau for 
seasonal adjustment.


 Working  - among other things- in the field of (short  long term) 
electricity
 forecast,  we are now using too many  too expensive pieces of licensed
 software: SAS, SPSS, EViews. This sedimentation is due to the fact 
that
 my predecessors in the past used different consultant companies to 
manage
 each procedure.

 Having attended the useR2004! Conference with the aim of assessing if R
 ALONE could glue all those fragmented and isolated procedures, I'm 
almost
 convinced now that YES it could do the job!

 Now - to start with - a first problem to solve:

 we have to comply with the Tramo-seats closed-source procedure (
http://www.bde.es/informes/be/docs/dt0014e.pdf)
 to deal with seasonality of electricity monthly time-series, in line 
with
 the methodology officially adopted by our  National Bureau of 
Statistics.

 Searching in R-help mailing list I didn't find anything about a 
tramo-seats
 R version. 

Jim Callahan
Management, Budget  Accounting
City of Orlando
(407) 246-3039 office
(407) 234-3744 cell phone
[[alternative HTML version deleted]]

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


[R] equivalent of the Splus function eboulis()

2004-05-25 Thread n\.bouget
Hi,
Is there a equivalent of the function eboulis() (which is a
new funtion on Splus) on R? 
Otherwise, with which function can we see the best number of
cluster we have to choose?
Thanks in advance,
Nicolas BOUGET

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)

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


[R] NLME

2004-05-25 Thread Abderrahim Oulhaj
Hi everyone,

Does the selfstart function SSlogis of the nlme library  allows the introduction of 
time  varying covariates ?
For example how can I interpret the xmid parameter (reperesenting the age at which we 
reach the half of the asymptote) if I want to explain it by a some time varying 
covariate?

Thanks in adavance,

Abderrahim


Abderrahim Oulhaj, Phd in Statistics
Oxford University
Department of Pharmacology
Mansfield Road
Oxford OX1 3QT
Tel:  +44 1865 224098
Fax: +44 1865 224099
Email: [EMAIL PROTECTED]


[[alternative HTML version deleted]]

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


[R] Re: identify() in script

2004-05-25 Thread Diogo FC Patrao
   I want a script of mine to run identify(), and possibly switch to
   interactive mode at some point. Is it possible?

in case you're interested, I found myself a solution for my problem.
create a file (test.R) containing

x=rnorm(100)
y=rnorm(100)
x11()
plot( x,y )
identify(x,y,1:100)

then $ R  test.R will do the trick

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


Re: [R] equivalent of the Splus function eboulis()

2004-05-25 Thread Prof Brian Ripley
On Tue, 25 May 2004, n.bouget wrote:

 Is there a equivalent of the function eboulis() (which is a
 new funtion on Splus) on R? 

There is no such function in the latest S-PLUS, version 6.2.  Further,
S-PLUS is an English product and `eboulis' appears to be French.

 Otherwise, with which function can we see the best number of
 cluster we have to choose?

Please check out where you got that function from, and give us a 
description of what you are looking for.  We cannot tell you the 
equivalent of a non-existent function (except to give you a list of 
non-existent R functions).

-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] correlation coefficient of ARIMA() or GLS() ?

2004-05-25 Thread Jan Verbesselt
Hi R-helpers,

I fitted the following ARIMA model onto de-seasonlised time series 1 and
2, which were strongly seasonal. How can the R² or the coefficient of
determination for the structural term be calculated between these two
fitted time series? 

Is an GLS() the solution (difference between ARIMA and GLS) ? Is it
possible to calculated an R² from a GLS() model ? # nlme and MASS
package


***
reg.model - arima(serie2.dd, order=c(6,0,0), xreg = serie1.dd, method =
ML) 
tsdiag(reg.model)  #  =looks OK. residuals are not autocorrelated
(ljung-box statistic)  but not normally distributed.Problem?

 reg.model
Call:
arima(x = serie2.dd, order = c(6, 0, 0), xreg = serie1.dd, method =
ML)
Coefficients:
 ar1 ar2 ar3 ar4 ar5 ar6 intercept serie1.dd

 -0.1033 -0.3957 -0.0423 -0.2719 -0.2969 -0.1401   -2.3535  585.9007
s.e.  0.0843  0.0823  0.0831  0.0857  0.0795  0.08293.1520  118.1323

sigma^2 estimated as 6932:  log likelihood = -829.9,  aic = 1677.79


gls.ddm2 - gls(serie2.ddm ~ serie1.ddm -1, correlation=corARMA(p=6),
method=ML) # fit of a gls without intercept because the intercept was
not significant but residuals are still auto correlated...?!


Tips, advice or examples are mostly welcome.
Many thanks in advance,
Regards,
Jan

_
Jan Verbesselt 
Research Associate 
Lab of Geomatics and Forest Engineering K.U. Leuven
Vital Decosterstraat 102. B-3000 Leuven Belgium 
Tel:+32-16-329750   Fax: +32-16-329760
http://gloveg.kuleuven.ac.be/

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


Re: [R] equivalent of the Splus function eboulis()

2004-05-25 Thread [EMAIL PROTECTED]
This function already exists in the package multidim (see
http://cran.r-project.org/doc/packages/multidim.pdf)
What i want to do is to choose the good number of cluster
after using the function hclust on 6934 instances. 
 hc - hclust(dist(AGRIINSTTableFinaleCR), ward)
I use the following expression
 barplot(sort((hc$height/sum(hc$height))*100,decreasing=TRUE))
and i choose as number of cluster the number before a big fall
but i'm not sure that is the good mean to choose the number of
cluster!

 On Tue, 25 May 2004, n.bouget wrote:
 
  Is there a equivalent of the function eboulis() (which is a
  new funtion on Splus) on R? 
 
 There is no such function in the latest S-PLUS, version 6.2.
 Further,
 S-PLUS is an English product and `eboulis' appears to be French.
 
  Otherwise, with which function can we see the best number of
  cluster we have to choose?
 
 Please check out where you got that function from, and give
us a 
 description of what you are looking for.  We cannot tell you
the 
 equivalent of a non-existent function (except to give you a
list of 
 non-existent R functions).
 
 -- 
 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
 
 

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)

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


Re: [R] vectorize an expression

2004-05-25 Thread Prof Brian Ripley
Suggestion 1: Use the R function `dist'.

Suggestion 2: Don't mask an R system function name.

Suggestion 3: Time this.  I don't think it is worth vectorizing.

Suggestion 4: The bit which is actually nonvectorized is your function 
dist.  If you had a vectorized distance function, you could do

for(i in 1:5) array[i,] - dist(a[i,,drop=FALSE] , a)

but that would need

dist - function(x1,x2) sqrt(rowSums(x1-x2)^2)

I could tell you how to fully vectorize it, but I doubt if it would have 
any benefit.

(None of this is tested, because of 1 and 3.)

On Tue, 25 May 2004, Robin Hankin wrote:

 Hi guys.  Another thing I cannot vectorize:
 
 I have an array a, of size 5-by-2, for example, of 5 2D vectors.  I
 also have a distance function that computes the distance between two
 vectors (usual Euclidean distance is a good example but I have other metrics I
 want to use as well).  I want a 5-by-5 array with the [i,j]th element being
   the distance from a[i,] to a[j,]
 
 To Wit:
 
a - matrix(1:10,5,2)
array - matrix(NA, 5, 5)
dist - function(x1,x2){sqrt(sum(x1-x2)^2)}
 
#NONVECTORIZED BIT FOLLOWS
for(i in 1:5) {
  for(j in 1:5) {
array[i,j] - dist(a[i,] , a[j,])
  }
}
 
 (note that array[i,i]=0 for i=1:5 as expected).
 
 How to vectorize this?
 
 
 

-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] equivalent of the Splus function eboulis()

2004-05-25 Thread Prof Brian Ripley
But multidim is not part of S-PLUS, and it does seem to exist for R.
So the equivalent of eboulis() in R is eboulis()!

On Tue, 25 May 2004, [EMAIL PROTECTED] wrote:

 This function already exists in the package multidim (see
 http://cran.r-project.org/doc/packages/multidim.pdf)
 What i want to do is to choose the good number of cluster
 after using the function hclust on 6934 instances. 
  hc - hclust(dist(AGRIINSTTableFinaleCR), ward)
 I use the following expression
  barplot(sort((hc$height/sum(hc$height))*100,decreasing=TRUE))
 and i choose as number of cluster the number before a big fall
 but i'm not sure that is the good mean to choose the number of
 cluster!
 
  On Tue, 25 May 2004, n.bouget wrote:
  
   Is there a equivalent of the function eboulis() (which is a
   new funtion on Splus) on R? 
  
  There is no such function in the latest S-PLUS, version 6.2.
  Further,
  S-PLUS is an English product and `eboulis' appears to be French.
  
   Otherwise, with which function can we see the best number of
   cluster we have to choose?
  
  Please check out where you got that function from, and give
 us a 
  description of what you are looking for.  We cannot tell you
 the 
  equivalent of a non-existent function (except to give you a
 list of 
  non-existent R functions).
  
  -- 
  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
  
  
 
 Accédez au courrier électronique de La Poste : www.laposte.net ; 
 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
 
 
 
 
 

-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] RMySQL problem - SOLVED

2004-05-25 Thread Ernesto Jardim
Hi,

The problem was the row.names that were sent to the database and created
an primary key duplicate. Now it works fine.

BTW congratulations for the package. It copied 15300 rows by 11 columns
in less than 5 seconds, in my PIII 833 with 1 GB RAM.

 system.time(dbWriteTable(con, TBL_SIMDATA, TBL.SIMDATA, append =
TRUE, row.names=F))
[1] 3.87 0.05 4.86 0.01 0.00
 

Just one suggestion. It would be usefull to have a more verbose output,
maybe the LOAD DATA INFILE output. 

Thanks for your help.

EJ


On Tue, 2004-05-25 at 13:01, Sean Davis wrote:
 I have written tables with 10,000 rows before without incident, so I'm not
 sure what is going on--out of my league.  Is this idiosyncratic to your
 data?  In other words, can you load a simple 2-column table with 1 rows?
 If not, I would suggest writing R code to construct the 1  row toy
 example, write the table to MySQL, and then a dbReadTable and show that the
 number of rows is incorrect and post the code and results to the list.
 
 Sean
 
 On 5/25/04 7:24 AM, Ernesto Jardim [EMAIL PROTECTED] wrote:
 
  On Tue, 2004-05-25 at 11:00, Sean Davis wrote:
  The function that you are looking for is:
  
  help.search(writetable)
  
  Or whatever in quotes you like.  Also, you can try help.start() which will
  give you the browser window with HTML versions of docs and a search
  facility.  
  
  When you say import, what do you mean?  Reading an Rdata file, a text
  file, or reading from mysql?
  
  I'm referring to the number of rows that R sent to MySQL with the
  dbWriteTable method. The dataframe has 13500 rows but when I do
  
  dbWriteTable(con, TBL_SIMDATA, TBL.SIMDATA, append = TRUE)
  [1] TRUE
  
  the TBL_SIMDATA table in MySQL has only 555 rows ...
  
  EJ
  
  Sean
  
  
  On 5/25/04 5:34 AM, Ernesto Jardim [EMAIL PROTECTED] wrote:
  
  Hi,
  
  I found the dbWriteTable function.
  
  Sorry for the work but I'm still trying to understand how the S4
  documentation works. If you do help(package=RMySQL) the
  dbWriteTable method does not exist. It exists a dbReadTable method
  wich has an alias to dbWriteTable. It should be intuitive but it
  wasn't for me ...
  
  Now the method: I could only import 555 rows ... Is there some flag
  about the number of rows it can import ?
  
  Regards
  
  EJ 
  
  On Mon, 2004-05-24 at 22:44, David James wrote:
  Hi,
  
  The method for dbWriteTable() uses the MySQL bulk loading faciliy
  LOAD DATA LOCAL INFILE to efficiently upload a file into the
  server.  So you should be able to issue something like
  sim.result - big.simulation(...)
  dbWriteTable(con, table_name, sim.results, append = TRUE)
  to append the rows in sim.results into the MySQL table_name.
  
  However, I should mention that the currently implementation
  outputs the contents of the data.frame into a temporary file
  using the function write.table(), which in the past could be
  slow.
  
  Hope this helps,
  
  --
  David
  
  Ernesto Jardim wrote:
  Hi,
  
  I'm using R 1.9.0 with RMySQL 0.5-4 and MySQL 3.23.55 on a suse 8.2 box.
  
  I have a simulation study and (as usual for newbies in simulation, I
  guess) I have a lot of data that I want to store in MySQL. I want to
  write an R script that reads data from RData files and writes it to a
  MySQL database.
  
  I read some R documents (R Data Import/Export and DSC papers) but I'm
  finding differences between the documents and the packages (RMySQL and
  DBI). I don't find the methods to write data like dbWriteTable...
  
  On the other hand I've tryied to build a sql statement to insert data
  but I'm stucked because of ... who knows, my ignorance probably. I want
  to take advantage of MySQl INSERT INTO statement that deals with several
  rows at once to insert a complete data.frame into a table. I've tryied
  to use paste to build the sql string but It works by column and I
  need it by row ...
  
  The sql systax should be something like:
  
  INSERT INTO TABLEA(COL1, COL2, COL3) VALUES
  (VAL11, VAL12, VAL13),
  (VAL21, VAL22, VAL23),
  ...
  (VALN1, VALN2, VALN3);
  
  and I have a data.frame with 3 columns corresponding to that table
  columns.
  
  How can I do this ?
  
  Thanks
  
  EJ
  
  __
  [EMAIL PROTECTED] mailing list
  https://www.stat.math.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html
  
  __
  [EMAIL PROTECTED] mailing list
  https://www.stat.math.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html
  
 

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


[R] Bivariate interpolation

2004-05-25 Thread Miha STAUT
Hello,
Is there any other bivariate pointwise interpolation command besides akima's 
interpp? I tried to search through the J. Baron's page without luck.

The problem is that I have got regularly spaced data (in x and y) what is 
not acceptable for interpp.

I am not very much interested in the method of interpolation as the data are 
dense and the error would not be to high.

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


[R] UseR 2004 Proceeding

2004-05-25 Thread Agustin Calatroni
In the past conference (i.e. DSC 2003) the proceedings were available
for download. This year UseR website only has the abstracts of the
papers. Does anybody know if the full text will be available for
download?

Thanks,
Agustin Calatroni ;-)

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


[R] Agnes and Hclust

2004-05-25 Thread n\.bouget
Hi,

I want to know if there is a difference between the two
hierarchical methods Agnes and hclust when there are used with
the same method and the same metric on the same data! I ask
this question because I executed the following program: 
hc - hclust(dist(AGRIINSTTableFinaleCR), ward)
agnes-agnes(dist(AGRIINSTTableFinaleCR),method=ward)
And clusters are not the same even if they are a little similar!

Is anybody know why i have this difference?

Thanks in advance

Nicolas BOUGET 




Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)

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


Re: [R] UseR 2004 Proceeding

2004-05-25 Thread Marc Schwartz
On Tue, 2004-05-25 at 09:11, Agustin Calatroni wrote:
 In the past conference (i.e. DSC 2003) the proceedings were available
 for download. This year UseR website only has the abstracts of the
 papers. Does anybody know if the full text will be available for
 download?
 
 Thanks,
 Agustin Calatroni ;-)


According to an announcement made on Saturday there will not be a
proceedings.

Some authors may post their complete presentation on their web sites
(where available) or perhaps may be willing to e-mail their presentation
in PDF format. You may be best served to contact the author(s) directly,
if there is a particular paper you are interested in.

HTH,

Marc Schwartz

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


[R] Description of profiles ?

2004-05-25 Thread Klemens Barfus
Hello together,
I am working on liquid water profiles of clouds and would like to describe
these profiles in relation to a reference profile.
What is the best way to do this ? RMSE would equal positiv and negativ
deviations. Is it better to use a correlation coefficient ?
What is the best way, espacially when I want to find out profiles with the
same behaviour / shape, which are just more or less shifted / just have a
different mean value ?
Thanks for your help in advance !

Klemens

Dipl.-Geogr. Klemens Barfus
Institute for Hydrology and Meteorology
Technical University of Dresden
Germany

--

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


Re: [R] Tramo-seats support in GRETL, but not R

2004-05-25 Thread Dirk Eddelbuettel

FYI: GNU Gretl and GNU R are on every Debian mirror. My Quantian cdroms also
have x12a (deb package derived from the rpm on Cottrell's gretl site) which
is way less awkward to use via gretl than directly.  

However, tramo-seat _cannot_ be redistributed freely due to license issues.
Pity. If anybody feels like petitioning the good folks at the Bank of Spain,
go for it.

Regards, Dirk

-- 
The relationship between the computed price and reality is as yet unknown.  
 -- From the pac(8) manual page

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


RE: [R] code for functions in base package

2004-05-25 Thread Qamruz Zaman
Hello
My name is qamruz zaman and i want to see the codes of Kaplan meier and 
Bootstrap. Is it possible, if yes then please guide me step by step and 
also show me how to write my own functions.
Bye

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


Re: [R] adress the current index

2004-05-25 Thread Thomas Petzoldt
Mag. Ferri Leberl wrote:
How can I adress the current index of a vector?
I want to work with time series and therefore give the n-th element of a 
vector some value dependent on the value of the n-1th element.
Sorry, your question is not really clear, but possibly the following may 
help:

1) If you have a vector x, you can create a shifted vector by removing 
the first element, e.g.:

xnew - x[-1] + somevalue # or apply a function f(x[-1])
2) The last element can be removed with:
xnew - x[-length(x)]
3) ... and sometimes vector concatenation ?c or the ?ifelse function can 
be useful in such circumstances.

Thomas P.
PS: there is more about such things in the docs.
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] readline

2004-05-25 Thread Stoyan Iliev
problem: readline does not work
background: readline installed OK. R found it and listed as available 
library. when I start R none of the readline command editing is 
available, just raw sh editing.
system: Solaris 9 on Sparc

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


Re: [R] Bivariate interpolation

2004-05-25 Thread Angel Lopez
library(fields)
?interp.surface
Best,
Angel
Miha STAUT wrote:
Hello,
Is there any other bivariate pointwise interpolation command besides 
akima's interpp? I tried to search through the J. Baron's page without 
luck.

The problem is that I have got regularly spaced data (in x and y) what 
is not acceptable for interpp.

I am not very much interested in the method of interpolation as the data 
are dense and the error would not be to high.

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

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


[R] Object silhouette.default not found. But I knew that it is there.

2004-05-25 Thread Wolski
Hi!

 
library(cluster)
In this lib a function called silhoutte.default is defined
than on the R prompt it type
silhouette.default
Error: Object silhouette.default not found 
R1.9.0
The same error are at R1.8.1
And I knew that a function silhoutte.default are present.

But the same piece of code works in R1.6.2

???

Eryk

Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


Re: [R] readline

2004-05-25 Thread Paulo Justiniano Ribeiro Jr
have you installed readline-dev ?

In my Debian Linux I need
libreadlin4-dev

Cheers
P.J.

On Tue, 25 May 2004, Stoyan Iliev wrote:

 problem: readline does not work

 background: readline installed OK. R found it and listed as available
 library. when I start R none of the readline command editing is
 available, just raw sh editing.
 system: Solaris 9 on Sparc

 any help is appreciated.
 thanks
 stoyan

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



Paulo Justiniano Ribeiro Jr
Departamento de Estatística
Universidade Federal do Paraná
Caixa Postal 19.081
CEP 81.531-990
Curitiba, PR  -  Brasil
Tel: (+55) 41 361 3471
Fax: (+55) 41 361 3141
e-mail: [EMAIL PROTECTED]
http://www.est.ufpr.br/~paulojus

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


[R] useR! 2004 pictures online

2004-05-25 Thread Bettina Gruen
Dear useRs,
pictures from the first R user conference useR! 2004 are now available
online at the conference web page:
http://www.ci.tuwien.ac.at/Conferences/useR-2004/Photos/index.html  
Pictures from other participants will be included on the web page if 
they are sent to me. Feel free to contribute!

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


Re: [R] Object silhouette.default not found. But I knew that it is there.

2004-05-25 Thread Uwe Ligges
Wolski wrote:
Hi!
 

library(cluster)
In this lib a function called silhoutte.default is defined
than on the R prompt it type
silhouette.default
Error: Object silhouette.default not found 
R1.9.0
The same error are at R1.8.1
And I knew that a function silhoutte.default are present.

But the same piece of code works in R1.6.2
???
Well, namespaces have been introduced in the meantime, and you have 
learned at the useR to call the generic silhouette() directly
or to use
   cluster:::silhouette.default
to get the code.

Uwe Ligges

Eryk
Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


Re: [R] Object silhouette.default not found. But I knew that it is there.

2004-05-25 Thread Wolski
Hi!

Thanks! You right. Have not realised it.

I do not wanted to call the function but I wanted to see the function definition. Its 
a great feature of R to be able to do it.
I knew I cant do it because the function object is not in the namespace.
Ive been confronted with the reverse side of namespaces.

On the other hand: 
?silhouette.default  works.
It would be nice to have a way to display to source without going into the library 
directory.



Sincerely
Eryk

PS.


*** REPLY SEPARATOR  ***

On 5/25/2004 at 6:17 PM Uwe Ligges wrote:

Wolski wrote:

 Hi!
 
  
 
library(cluster)
 
 In this lib a function called silhoutte.default is defined
 than on the R prompt it type
 
silhouette.default
 
 Error: Object silhouette.default not found 
 R1.9.0
 The same error are at R1.8.1
 And I knew that a function silhoutte.default are present.
 
 But the same piece of code works in R1.6.2
 
 ???

Well, namespaces have been introduced in the meantime, and you have 
learned at the useR to call the generic silhouette() directly
or to use
cluster:::silhouette.default
to get the code.

Uwe Ligges



 Eryk
 
 Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
 Ihnestrasse 63-73 14195 Berlin   'v'
 tel: 0049-30-83875219   /   \
 mail: [EMAIL PROTECTED]---W-W   
http://www.molgen.mpg.de/~wolski
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

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



Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


Re: [R] Object silhouette.default not found. But I knew that it is there.

2004-05-25 Thread Uwe Ligges
Wolski wrote:
Hi!
Thanks! You right. Have not realised it.
I do not wanted to call the function but I wanted to see the function definition. Its 
a great feature of R to be able to do it.
I knew I cant do it because the function object is not in the namespace.
Ive been confronted with the reverse side of namespaces.
On the other hand: 
?silhouette.default  works.
It would be nice to have a way to display to source without going into the library directory.
I just told you (and Fritz did so last week in his keynote lecture) to 
specify the namespace explicitly using the ::: operator as in:

 cluster:::silhouette.default
and you will see the source, so what's the point?
Uwe


Sincerely
Eryk
PS.
*** REPLY SEPARATOR  ***
On 5/25/2004 at 6:17 PM Uwe Ligges wrote:

Wolski wrote:

Hi!


library(cluster)
In this lib a function called silhoutte.default is defined
than on the R prompt it type

silhouette.default
Error: Object silhouette.default not found 
R1.9.0
The same error are at R1.8.1
And I knew that a function silhoutte.default are present.

But the same piece of code works in R1.6.2
???
Well, namespaces have been introduced in the meantime, and you have 
learned at the useR to call the generic silhouette() directly
or to use
  cluster:::silhouette.default
to get the code.

Uwe Ligges


Eryk
Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-W   
http://www.molgen.mpg.de/~wolski
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


Re: [R] Object silhouette.default not found... there.

2004-05-25 Thread Martin Maechler

 Eryk == Eryk Wolski [EMAIL PROTECTED]
 on Tue, 25 May 2004 17:38:10 +0200 writes:

Eryk Hi!
 library(cluster)
Eryk In this lib a function called silhoutte.default is defined
Eryk than on the R prompt it type
 silhouette.default
Eryk Error: Object silhouette.default not found 
Eryk R1.9.0
Eryk The same error are at R1.8.1
Eryk And I knew that a function silhoutte.default are present.

Hi Eryk,

please do learn about namespaces;  many good R packages (incl.
all standard and recommended packages) nowadays make use of
namespaces, and we expect even more in the future.

One big advantage of 'namespacing a package' is that
you can make sure that your functions call your other functions
even if they have the same name as someone's functions in
another package.  Another big pro is that you can use as many
``package-internal'' objects {helper-functions in my useR talk}
as you want: They won't be visible to the user and not clutter
the global namespace.
One side effect of namespaces: We usually do not export (S3)
methods such as silhouette.default() :

A user should call silhouette(...) and the method dispatching
chooses the corresponding method.

Now, to see hidden objects, you can 

1) use  getAnywhere()   { getAnywhere(silhouette.default) }
2) use  namespace:::object  { cluster:::silhouette.default }

and for S3 methods,

3) getS3method(generic, class)

   i.e., in this case getS3method(silhouette, default)

--

BUT:  You won't see the source code of silhouette.default !

Instead:

  1) Learn how to get and unpack the package source and then
 seecluster/R/silhouette.R

  2) if 1) is too difficult,
 open the filename you get from
   system.file(../cluster/R/cluster)
 in a text editor -- preferably an R-aware one ...
 which gives you a large file with all R source from the
 cluster package.   Now look for what you want.

Regards,
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] debian packages and html help on linux

2004-05-25 Thread Kari Ruohonen
I have a fresh installation of R from debian unstable packages. The
html index found in /usr/lib/R/doc/html/index.html works in Mozilla
and under the link of 'packages' on this page I have a list and
corresponding links. However, it appears that not all packages I have
installed from available deb files via apt-get, will get their link
updated to this package index. Specifically, from packages
r-cran-boot, r-cran-car, r-cran-coda, r-cran-design, r-cran-effects,
r-cran-foreign, r-cran-gregmisc, r-cran-hmisc, r-cran-its,
r-cran-lattice, r-cran-lmtest, r-cran-mcmcpack, r-cran-mgcv,
r-cran-multcomp, r-cran-relimp, r-cran-rgl, r-cran-rpart, r-cran-sm,
r-cran-tseries, r-cran-vr, r-omegahat-ggobi, r-cran-kernsmooth none
appeared to html package index. This also means that html search
doesn't find functions within these packages although it otherwise
works perfectly with my Mozilla.

What shall I do to get also these package to the package index?

Regards, Kari Ruohonen

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


Re: [R] Object silhouette.default not found... there.

2004-05-25 Thread Wolski
Hallo!

Thanks too James Holtman, Douglas Grove, Uwe Ligges, Martin Maechler,  for helpfull 
answers
to my questions.

Sincerely
Eryk

*** REPLY SEPARATOR  ***

On 5/25/2004 at 6:39 PM Martin Maechler wrote:

 Eryk == Eryk Wolski [EMAIL PROTECTED]
 on Tue, 25 May 2004 17:38:10 +0200 writes:

Eryk Hi!
 library(cluster)
Eryk In this lib a function called silhoutte.default is defined
Eryk than on the R prompt it type
 silhouette.default
Eryk Error: Object silhouette.default not found 
Eryk R1.9.0
Eryk The same error are at R1.8.1
Eryk And I knew that a function silhoutte.default are present.

Hi Eryk,

please do learn about namespaces;  many good R packages (incl.
all standard and recommended packages) nowadays make use of
namespaces, and we expect even more in the future.

One big advantage of 'namespacing a package' is that
you can make sure that your functions call your other functions
even if they have the same name as someone's functions in
another package.  Another big pro is that you can use as many
``package-internal'' objects {helper-functions in my useR talk}
as you want: They won't be visible to the user and not clutter
the global namespace.
One side effect of namespaces: We usually do not export (S3)
methods such as silhouette.default() :

A user should call silhouette(...) and the method dispatching
chooses the corresponding method.

Now, to see hidden objects, you can 

1) use  getAnywhere()  { getAnywhere(silhouette.default) }
2) use  namespace:::object  { cluster:::silhouette.default }

and for S3 methods,

3) getS3method(generic, class)

   i.e., in this case getS3method(silhouette, default)

--

BUT:  You won't see the source code of silhouette.default !

Instead:

  1) Learn how to get and unpack the package source and then
 seecluster/R/silhouette.R

  2) if 1) is too difficult,
 open the filename you get from
  system.file(../cluster/R/cluster)
 in a text editor -- preferably an R-aware one ...
 which gives you a large file with all R source from the
 cluster package.   Now look for what you want.

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



Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin   'v'
tel: 0049-30-83875219   /   \
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski

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


Re: [R] Object silhouette.default not found... there.

2004-05-25 Thread Tamas Papp
On Tue, May 25, 2004 at 06:39:13PM +0200, Martin Maechler wrote:

 please do learn about namespaces;  many good R packages (incl.
 all standard and recommended packages) nowadays make use of
 namespaces, and we expect even more in the future.

I also want to learn about namespaces.  I have looked at ?:::, but I
think that a tutorial-like document would help me apply and understand
namespaces better.  So where should I look for a gentle introduction
to namespaces, with examples, if there is such a thing?

Tamas

-- 
Tamás K. Papp
E-mail: [EMAIL PROTECTED]
Please try to send only (latin-2) plain text, not HTML or other garbage.

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


Re: [R] debian packages and html help on linux

2004-05-25 Thread Prof Brian Ripley
On Tue, 25 May 2004, Kari Ruohonen wrote:

 I have a fresh installation of R from debian unstable packages. The
 html index found in /usr/lib/R/doc/html/index.html works in Mozilla
 and under the link of 'packages' on this page I have a list and
 corresponding links. However, it appears that not all packages I have
 installed from available deb files via apt-get, will get their link
 updated to this package index. Specifically, from packages
 r-cran-boot, r-cran-car, r-cran-coda, r-cran-design, r-cran-effects,
 r-cran-foreign, r-cran-gregmisc, r-cran-hmisc, r-cran-its,
 r-cran-lattice, r-cran-lmtest, r-cran-mcmcpack, r-cran-mgcv,
 r-cran-multcomp, r-cran-relimp, r-cran-rgl, r-cran-rpart, r-cran-sm,
 r-cran-tseries, r-cran-vr, r-omegahat-ggobi, r-cran-kernsmooth none
 appeared to html package index. This also means that html search
 doesn't find functions within these packages although it otherwise
 works perfectly with my Mozilla.
 
 What shall I do to get also these package to the package index?

Use the correct index: see ?help.start.  Installing a package does not 
update /usr/lib/R/doc/html/packages.html, but help.start() creates a 
current index dynamically.

If you really want to do this without running R, use

R CMD perl /usr/lib/R/share/perl/build-help.pl --htmllists

to update the static index.  From inside R you can run 
make.packages.html().  In both cases, you need write permission in 
/usr/lib/R/doc/html.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


[R] accessing function arguments as text, macro style

2004-05-25 Thread Ed L Cashin
Hi.  In a case like this, I can get strip headings that have the name
c and the value for c.

  d - data.frame(a=1:5,b=6:10,c=11:15)
   xyplot(a ~ b | paste(c, c), data=d)
   

For more complicated examples, instead of using paste repeatedly I
would like to use a function.  It seems like what I really want is a
macro, though.  I'm not quite familiar enough with R's treatment of
function parameters to know how to do something like this (ficticious
example):

  f - function(x) { paste(identifier(x), value(x)) }
   rambo - brave
   f(rambo)
  rambo brave

I've checked ?function, ?args, ?eval, and some others, but I think
I'm barking up the wrong tree.  Any pointers would be most
appreciated. 
  
-- 
--Ed L Cashin|   PGP public key:
  [EMAIL PROTECTED]|   http://noserose.net/e/pgp/

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


Re: [R] accessing function arguments as text, macro style

2004-05-25 Thread Gabor Grothendieck
Ed L Cashin ecashin at uga.edu writes:
 function parameters to know how to do something like this (ficticious
 example):
 
   f - function(x) { paste(identifier(x), value(x)) }
rambo - brave
f(rambo)
   rambo brave


R f - function(x) paste(as.character(substitute(x)),x)
R z - 3
R f(z)
[1] z 3

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


Re: [R] accessing function arguments as text, macro style

2004-05-25 Thread Ed L Cashin
Gabor Grothendieck [EMAIL PROTECTED] writes:

...
 R f - function(x) paste(as.character(substitute(x)),x)
 R z - 3
 R f(z)
 [1] z 3

Fantastic.  Works like a charm.  

-- 
--Ed L Cashin|   PGP public key:
  [EMAIL PROTECTED]|   http://noserose.net/e/pgp/

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


Re: [R] debian packages and html help on linux

2004-05-25 Thread Prof Brian Ripley
On Tue, 25 May 2004, Dirk Eddelbuettel wrote:

 On Tue, May 25, 2004 at 06:14:42PM +0100, Prof Brian Ripley wrote:
  On Tue, 25 May 2004, Kari Ruohonen wrote:
  
   I have a fresh installation of R from debian unstable packages. The
   html index found in /usr/lib/R/doc/html/index.html works in Mozilla
   and under the link of 'packages' on this page I have a list and
   corresponding links. However, it appears that not all packages I have
   installed from available deb files via apt-get, will get their link
   updated to this package index. Specifically, from packages
   r-cran-boot, r-cran-car, r-cran-coda, r-cran-design, r-cran-effects,
   r-cran-foreign, r-cran-gregmisc, r-cran-hmisc, r-cran-its,
   r-cran-lattice, r-cran-lmtest, r-cran-mcmcpack, r-cran-mgcv,
   r-cran-multcomp, r-cran-relimp, r-cran-rgl, r-cran-rpart, r-cran-sm,
   r-cran-tseries, r-cran-vr, r-omegahat-ggobi, r-cran-kernsmooth none
   appeared to html package index. This also means that html search
   doesn't find functions within these packages although it otherwise
   works perfectly with my Mozilla.
   
   What shall I do to get also these package to the package index?
  
  Use the correct index: see ?help.start.  Installing a package does not 
  update /usr/lib/R/doc/html/packages.html, but help.start() creates a 
  current index dynamically.
  
  If you really want to do this without running R, use
  
  R CMD perl /usr/lib/R/share/perl/build-help.pl --htmllists
  
  to update the static index.  From inside R you can run 
  make.packages.html().  In both cases, you need write permission in 
  /usr/lib/R/doc/html.
 
 That sounds like something we could easily execute via the postinst script
 once the package as been unpacked. As that step runs as root, permissions
 would not be an issue.

Might be a good idea.  R (except on Windows/MacOSX) is not really set up 
for binary package installs, but on Windows install.packages() does the 
R-level equivalent (and I remembered wrongly: on Unix make.packages.html() 
works in tmpdir/.R).

 Would that step alleviate the need for the per-user ~/.R/ index ?

Actually, it is per-session in a tempdir these days.  Not really, as
there can be several library trees in use.

-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Update of the R GUI projects web site

2004-05-25 Thread Philippe Grosjean
Hi all,

GUIs for R is an active field of research, as illustrated by contributions
in this topic at the recent UseR! conference. I have just updated
http://www.r-project.org/GUI to reflect changes and new projects like JGR,
wxPython, Rho and SciViews-R.
Best,

Philippe Grosjean

...°}))
 ) ) ) ) )
( ( ( ( (   Prof. Philippe Grosjean
\  ___   )
 \/ECO\ (   Numerical Ecology of Aquatic Systems
 /\___/  )  Mons-Hainaut University, Pentagone
/ ___  /(   8, Av. du Champ de Mars, 7000 Mons, Belgium
 /NUM\/  )
 \___/\ (   phone: + 32.65.37.34.97, fax: + 32.65.37.33.12
   \ )  email: [EMAIL PROTECTED]
 ) ) ) ) )  SciViews project coordinator (http://www.sciviews.org)
( ( ( ( (
...

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


RE: [R] thanks again

2004-05-25 Thread Philippe Grosjean
Chad,

Do not forget that, due to the contaminant character of the GPL license, if
you put a R logo on a t-shirt, you have to share and distribute it freely to
the community,... and do not forget to distribute the source with it ;-)

Best,

Philippe Grosjean

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Chad Shaw
Sent: Tuesday, 25 May, 2004 19:52
To: [EMAIL PROTECTED]
Subject: [R] thanks again


Achim:

Thanks again for the conference.  We had good fun.

I have 2 requests:
1)  I'd like to email my R-foundation membership to you.
I will scan the form and send just like I did for the meeting.

2)  I want a useR t-shirt.  After lots of drinking and discussion with
Fritz Leisch at dinner on saturday, I feel there will be no chance for
an official T-shirt.

My question is:  any advice/ thoughts on how there can be T-shirts for
the conference?

Chad

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

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


Re: [R] accessing function arguments as text, macro style

2004-05-25 Thread Berton Gunter
This solution may not quite work as you intend. I believe that the preferred
solution is:
 f - function(x) paste(deparse(substitute(x)),x)

This would give the same result with the z-3 example below, but try it for both
versions with the call:
f(sin(3))

The subtlety is that substitute returns the parse TREE of its
(expression)argument, which you probably want deparsed rather than cast by
as.character().

Cheers,
Bert

Ed L Cashin wrote:

 Gabor Grothendieck [EMAIL PROTECTED] writes:

 ...
  R f - function(x) paste(as.character(substitute(x)),x)
  R z - 3
  R f(z)
  [1] z 3

 Fantastic.  Works like a charm.

 --
 --Ed L Cashin|   PGP public key:
   [EMAIL PROTECTED]|   http://noserose.net/e/pgp/

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

--

Bert Gunter

Non-Clinical Biostatistics
Genentech
MS: 240B
Phone: 650-467-7374


The business of the statistician is to catalyze the scientific learning
process.

 -- George E.P. Box

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


[R] (OT) Fourier coefficients.

2004-05-25 Thread Rolf Turner
This posting has nothing to do with R (except maybe that I am using R
very heavily in writing the paper to which the question pertains.)  I
simply wish to draw upon the impressive knowledge and wisdom of the R
community.

Since this question is way off topic, if anybody has the urge to
reply, they should probably email me directly:

[EMAIL PROTECTED]

rather than via this list.

My question is essentially about Fourier coefficients:

Suppose

   pi
   /
2*pi*a_k = | f(omega)*exp(-i*k*omega) d omega
   /
  -pi

and
   pi
   /
2*pi*b_k = | G(omega)*f(omega)*exp(-i*k*omega) d omega
   /
  -pi

(The ``*''-s just mean multiplication here, not convolution; i is
of course sqrt(-1).)

The function f() is positive and symmetric about 0 (it's actually
a spectral density function) and G() is the gain of a nice (ARMA)
filter

   | p(exp(i*omega) |^2
G(omega) = | -- |
   | q(exp(i*omega) |

where p() and q() are polynomials (with real coefficients); q() has
no zeroes inside the unit disk.

Suppose that the a_k satisfy an asymptotic condition:
a_k * ln k --- 0 as k --- infinity.  (The ``Berman condition''.)

Can I say that the b_k satisfy this condition?  If not, where
would I look for a counter-example?  And could I add some extra
not-too-stringent restrictions on the spectrum f() so that I
***could*** say that the b_k satisfy the Berman condition?

Any hints gratefully received.

cheers,

Rolf Turner
[EMAIL PROTECTED]

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


Re: [R] Object silhouette.default not found... there.

2004-05-25 Thread Uwe Ligges
Tamas Papp wrote:
On Tue, May 25, 2004 at 06:39:13PM +0200, Martin Maechler wrote:

please do learn about namespaces;  many good R packages (incl.
all standard and recommended packages) nowadays make use of
namespaces, and we expect even more in the future.

For example in R News:
@Article{Rnews:Tierney:2003,
  author   = {Luke Tierney},
  title= {Name Space Management for {R}},
  journal  = {R News},
  year = 2003,
  volume   = 3,
  number   = 1,
  pages= {2--6},
  month= {June},
  url  = {http://CRAN.R-project.org/doc/Rnews/}
}
and in Writing R Extensions.
Uwe Ligges

I also want to learn about namespaces.  I have looked at ?:::, but I
think that a tutorial-like document would help me apply and understand
namespaces better.  So where should I look for a gentle introduction
to namespaces, with examples, if there is such a thing?
Tamas
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] use of do.call and rep

2004-05-25 Thread Laura Holt
If I use this:
rep(1:2,c(5,5))
I'll get
1 1 1 1 1 2 2 2 2 2
Is there a way to do this more efficiently, please?
Maybe via do.call?
Thanks,
Laura
mailto: [EMAIL PROTECTED]
_
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] this is no joke

2004-05-25 Thread Chad Shaw
Peter
And don't forget to implement the impossible-to-take-it-off feature,
so that we can use it for capture-recapture experiments to estimate
the size of the R user base.
 

The relevance of T-shirts to the R scientific enterprise is beyond refute.
How can we compute those who compute without data?
I think the R-core should move rapidly to fill this void.
No more NULL values.
Let's gather the data.
Let's mark the useRs with a symbol. Not the scarlet A,
but something soothing and COOL.
useR
cashaw
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Saving/exporting graphs

2004-05-25 Thread Alberto Nettel Aguirre
HI:

I have tried to find a way in which to export/save graphs via the command
line. I know i can right click on it and save it as wmf etc.
But I was wandering if there is a function such as Splus'
export.graph

Thanks


From Alberto Nettel's Desk
University of Calgary
Math  Stats Department.
Room 346, ext 7199
E-mail: [EMAIL PROTECTED]

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


Re: [R] Saving/exporting graphs

2004-05-25 Thread Jason Turner
 HI:

 I have tried to find a way in which to export/save graphs via the command
 line. I know i can right click on it and save it as wmf etc.
 But I was wandering if there is a function such as Splus'
 export.graph

?win.metafile

as in

win.metafile(c:/foo.wmf)
plot(blah,blah,blah)
dev.off()

Cheers

Jason

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


Re: [R] Saving/exporting graphs

2004-05-25 Thread Sundar Dorai-Raj

Alberto Nettel Aguirre wrote:
HI:
I have tried to find a way in which to export/save graphs via the command
line. I know i can right click on it and save it as wmf etc.
But I was wandering if there is a function such as Splus'
export.graph
Thanks

From Alberto Nettel's Desk
University of Calgary
Math  Stats Department.
Room 346, ext 7199
E-mail: [EMAIL PROTECTED]
See ?Devices and in particular ?win.metafile. Also see ?savePlot.
--sundar
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] cor and missing values. Bug?

2004-05-25 Thread Jane Fridlyand

There seems to be an issue in computing rank correlations with missing
values present. I think this comes from the way rank() function works but
I am not sure how to go about this. Rank function places missing values at
the end by default thus skewing the rank relationship between two vectors:

Example:

R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3

 vec1 - 1:10
 vec2 - 2*vec1
 vec1[c(1, 5)] - NA
 cor(vec1, vec2, use=pair, method=pearson)
[1] 1
 cor(vec1[-c(1,5)], vec2[-c(1,5)], use=pair, method=pearson)
[1] 1
#pearson is OK
 cor(vec1, vec2, use=pair, method=spearman)
[1] 0.3212121
 cor(vec1[-c(1,5)], vec2[-c(1,5)], use=pair, method=spearman)
[1] 1
 cor(vec1, vec2, use=complete, method=spearman)
[1] 0.3212121
#BUG?
Interestingly, complete option which should exclude missing values
entirely does not fix an issue either. I think that rank function must be
applied before use is used (actually it is the case looking at the
actual code of cor).

I looked though the archives but have not seen this reported. Is it a bug
of rank-correlations or am I misinterpreting the intention?

Thank you

Jane




Jane Fridlyand, Assistant Professor
Department of Epidemiology and Biostatistics
Center for Bioinformatics and Molecular Biostatistics
UCSF Comprehensive Cancer Center,
Box 0128 San Francisco, CA 94143-0128
Office: Room N224 Tel: (415)476-0168 Fax: (415)502-3179

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


Re: [R] cor and missing values. Bug?

2004-05-25 Thread Peter Dalgaard
Jane Fridlyand [EMAIL PROTECTED] writes:

 There seems to be an issue in computing rank correlations with missing
 values present. I think this comes from the way rank() function works but
 I am not sure how to go about this. Rank function places missing values at
 the end by default thus skewing the rank relationship between two vectors:
 
 Example:
 
 R : Copyright 2003, The R Foundation for Statistical Computing
 Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3

Not to put too fine a point on it, but did you consider checking the
NEWS file for the most recent version (1.9.0,
http://cran.r-project.org/src/base/NEWS)?

o   The cor() function did not remove missing values in the
non-Pearson case.



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

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


[R] apology

2004-05-25 Thread Alberto Nettel Aguirre
I apologise, I asked about exporting graphs and said I could not find it.
Well I did, saveplot.
my apologies.

From Alberto Nettel's Desk
University of Calgary
Math  Stats Department.
Room 346, ext 7199
E-mail: [EMAIL PROTECTED]

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


[R] Need help on Mclus output

2004-05-25 Thread Max Marinucci
Dear useRs,
I have fitted a mixture with 4 normal components on a univariate distribution using 
the Mclust package.
Now, I would like to get a variable with the cluster membership of each class, or in 
alternative a variable with the posterior probabilities for each component.
Also I cannot find where are the paramenters estimates for each component ,i.e. means 
and variances.
I've read the documentation available but it seems to me very difficult to obtain 
these outputs.
Any hints?
thanx a lot
max
/***
Max Marinucci
PhD candidate 
Universidad Complutense Madrid
[[alternative HTML version deleted]]

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


[R] Turning pass/fail results into a proportion

2004-05-25 Thread Matthew Walker
Please forgive me, I feel exceptionally like a newbie.  Although I've 
read screeds of documentation, I just can't see how this is done.

I have a data frame that contains a number of pass/fails for certain 
variable sizes.  From that, I would like to form another data frame that 
contains the proportions of pass/fails per variable.

So, for example:
df - data.frame( Var=c(3,3,3,4,4), 
Result=c(pass,fail,fail,pass,pass), SampleSize=c(3,3,3,2,2))

And I'd like to produce the equivalent of:
data.frame( Var=c(3,4), ProportionPass=c(0.33, 1) )
I have found the table() function:
table( df$Var, df$Result)
which potentially seems to be part of the solution, however it turns the 
Var column into factors.

As an aside, is the storage of SampleSize (above) the best technique?  
Or is it better to store it in a data frame of its own:

data.frame( Var=c(3,4), SamepleSize=c(3,2) )
and then utilise some sort of lookup function?
Thank you for your thoughts,
Matthew Walker
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] No direct or inherited method for function update

2004-05-25 Thread Prof Brian Ripley
Try doing this without all those Bioconductor packages loaded.  It does 
work in base R, and I suspect that one of your packages has redefined 
update (by adding S4 methods?).  If you track down exactly which package 
causes the problem, you can report it to the appropriate person.

On Tue, 25 May 2004, Dick Beyer wrote:

 I used to be able to call update() for lme objects. Now I get this error:
 
ge.lme - update(ge.lme, data=dat)
 Error in update(ge.lme, data = dat) : No direct or inherited method for function 
 update for this call
 
 
 Here is the relevant portion of my code:
 
 ge - eset[1,]
 dat- data.frame(age, gen, fdr, ge)
 ge.lme - lme(fixed=ge~age+gen+age*gen, data=dat, random=~ 1| fdr)
 for (i in 1:nrow(eset)) {
   dat$ge - c(eset[i,])
   ge.lme - update(ge.lme, data=dat)
   .
   .
   .
 }
 
 I am using:
 base 1.9.0 
 utils 1.9.0 
 graphics 1.9.0 
 stats 1.9.0 
 methods 1.9.0 
 Biobase 1.4.14 
 affy 1.4.30 
 gcrma 1.1.0 
 annaffy 1.0.7 
 KEGG 1.4.0 
 GO 1.5.1 
 mgu74av2 1.4.0 
 nlme 3.1-48 
 xtable 1.2-1 
 
 Any help or suggestions would be most appreciated.
 
 Thanks much,
 Dick
 ***
 Richard P. Beyer, Ph.D.   University of Washington
 Tel.:(206) 616 7378   Env.  Occ. Health Sci. , Box 354695
 Fax: (206) 685 4696   4225 Roosevelt Way NE, # 100
   Seattle, WA 98105-6099
 http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


[R] SJava

2004-05-25 Thread Laura Holt
Hi again!
I'm trying to download SJava from the http://www.omegahat.org/RSJava/ 
website.

I'm trying to get the binary.
I download the version from BDR's website.
When I unzip the file via unzip.exe, the new folder appears as SJAVA (upper 
case).


library(SJava)
Error in library(SJava) : There is no package called 'SJava'
library(SJAVA)
Error in library(SJAVA) : There is no package called 'SJAVA'

Any suggestions, please?
TIA
Laura
mailto: [EMAIL PROTECTED]
_
Best Restaurant Giveaway Ever! Vote for your favorites for a chance to win 
$1 million! http://local.msn.com/special/giveaway.asp

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


Re: [R] apology

2004-05-25 Thread Prof Brian Ripley
I think it is savePlot   You seemed to be talking about R 
on Windows without mentioning it, and savePlot is only on Windows.
There are lots of other possibilities, e.g. dev.copy, on all R platforms.

On Tue, 25 May 2004, Alberto Nettel Aguirre wrote:

 I apologise, I asked about exporting graphs and said I could not find it.
 Well I did, saveplot.
 my apologies.
 
 From Alberto Nettel's Desk

[We prefer people's minds to be involved.]

 University of Calgary
 Math  Stats Department.
 Room 346, ext 7199
 E-mail: [EMAIL PROTECTED]


-- 
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
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] SJava

2004-05-25 Thread DJNordlund
In a message dated 5/25/2004 10:20:10 PM Pacific Daylight Time,  
[EMAIL PROTECTED] writes:
Hi again!

I'm trying to download SJava from the  http://www.omegahat.org/RSJava/ 
website.

I'm trying to get the  binary.

I download the version from BDR's website.

When I unzip  the file via unzip.exe, the new folder appears as SJAVA (upper  
case).


library(SJava)
Error in library(SJava) : There is  no package called 'SJava'
library(SJAVA)
Error in library(SJAVA) :  There is no package called 'SJAVA'


Any suggestions,  please?

TIA
Laura
mailto: [EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) 
-Reply---

Laura,

If you are using  an MS Windows platform I suspect you don't want to manually 
unzip the file; it  needs to be installed.  Rather, start Rgui, and from the 
Packages menu  select Install package(s) from local zip file... and follow 
the  directions.

Dan Nordlund

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