[R] Runing S-plus add-on in R (Binary and Smoothed Binary Regression Quantiles)

2004-03-30 Thread Joao Pedro W. de Azevedo
Hello,
I would like to know if it is possible to run a s-plus package in R. I'm
particularly interested on 
The add-on written by Walter Belluzzo and Gregory Kordas to estimate Binary
and Smoothed Binary Regression Quantiles using the Simulated Annealing
algorithm. 
Many thanks,
Joao Pedro

__
[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] numerical solution of functional equations (dynamic stochastic optimization)

2004-03-30 Thread Tamas Papp
Hi,

I need some help with solving functional equations (Bellman's or
Euler's) with numerical methods.  I have read the relevant books
(Kenneth L Judd: Numerical methods in economics, and some others), but
have no practical experience.

All the examples in these books are in Matlab, but I would prefer R,
since I have been using that for some time and I think that it is
generally much nicer a language.  So program code or advice from
somebody who has used R for solving dynamic stochastic optimization
problems (preferably in economics, but other fields are OK) would be
welcome.

Some specific questions:

1. The state space is 4 dimensional.  I think that I will use splines,
what is the easy way to generate and handle multidimensional spline
basis in R? There are many spline packages in R, which ones would you
recommend for this?

2. Is there a package in R which helps generate orthogonal an
Chebyshev basis?

3. I would like to use quadrature rules to speed up integration (ie
the calculation of expected values), which package would you
recommend?

Again, R code would be especially appreciated: I know some R, but
people on this list present such elegant solutions to use it in ways I
would not have thought of.

Thanks,

Tamas

-- 
Tamás K. Papp
E-mail: [EMAIL PROTECTED] (preferred, especially for large messages)
[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


[R] classification with nnet: handling unequal class sizes

2004-03-30 Thread Christoph Lehmann
I hope this question is adequate for this list

I use the nnet code from VR p. 348: The very nice and general function
CVnn2() to choose the number of hidden units and the amount of weight
decay by an inner cross-validation- with a slight modification to use it
for classification (see below).

My data has 2 classes with unequal size: 45 observations for classI and
116 obs. for classII

With CVnn2 I get the following confusion matrix (%) (average of 10
runs):

predicted
true53 47
16 84

I had a similar biased confusion matrix with randomForest until I used
the sampsize argument (the same holds for svm until I used the
class.weights argument).

How can I handle this problem of unequal class sizes with nnet, in order
to get a less biased confusion matrix?

(with randomForest I finally got 

78 22
16 84
)


many thanks for a hint

Christoph



#--- neural networks

#classification network is constructed; this has one output and entropy
fit if the number of levels is two, and a number of outputs equal to the
number of classes and a softmax output stage for more levels. -
therefore two lines of Prof. Ripley's wrapper function are changed below
(original commented out) and an additional function has been introduced
(resmatrix)

con - function(...)
{
print(tab - table(...))
diag(tab) - 0
cat(error rate = ,
round(100*sum(tab)/length(list(...)[[1]]), 2), %\n)
invisible()
}


CVnn2 - function(formula, data,
  size = c(0,4,4,10,10), lambda = c(0, rep(c(0.001,
0.01),2)),
  nreps = 1, nifold = 5, verbose = 99, ...)
{
resmatrix - function(predict.matrix,learn, data, ri, i)
{
   rae.matrix -   predict.matrix
   rae.matrix[,] - 0
   rae.vector - as.numeric(as.factor((predict(learn, data[ri ==
i,], type = class
   for (k in 1:dim(rae.matrix)[1]) {
 if (rae.vector[k] == 1) rae.matrix[k,1] - rae.matrix[k,1] + 1
else
 rae.matrix[k,2] - rae.matrix[k,2] + 1
   }
   rae.matrix
}


CVnn1 - function(formula, data, nreps=1, ri, verbose,  ...)
{
totalerror - 0
truth - data[,deparse(formula[[2]])]
res -  matrix(0, nrow(data), length(levels(truth)))
if(verbose  20) cat(  inner fold)
for (i in sort(unique(ri))) {
if(verbose  20) cat( , i,  sep=)
for(rep in 1:nreps) {
learn - nnet(formula, data[ri !=i,], trace = F, ...)
#res[ri == i,] - res[ri == i,] + predict(learn, data[ri
== i,])
res[ri == i,] - res[ri == i,] + resmatrix(res[ri ==
i,],learn,data, ri, i)
}
}
if(verbose  20) cat(\n)
sum(as.numeric(truth) != max.col(res/nreps))
}
truth - data[,deparse(formula[[2]])]
res -  matrix(0, nrow(data), length(levels(truth)))
choice - numeric(length(lambda))
for (i in sort(unique(rand))) {
if(verbose  0) cat(fold , i,\n, sep=)
ri - sample(nifold, sum(rand!=i), replace=T)
for(j in seq(along=lambda)) {
if(verbose  10)
cat(  size =, size[j], decay =, lambda[j], \n)
choice[j] - CVnn1(formula, data[rand != i,], nreps=nreps,
   ri=ri, size=size[j], decay=lambda[j],
   verbose=verbose, ...)
}
decay - lambda[which.is.max(-choice)]
csize - size[which.is.max(-choice)]
if(verbose  5) cat(  #errors:, choice,   ) #
if(verbose  1) cat(chosen size = , csize,
 decay = , decay, \n, sep=)
for(rep in 1:nreps) {
learn - nnet(formula, data[rand != i,], trace=F,
  size=csize, decay=decay, ...)
#res[rand == i,] - res[rand == i,] + predict(learn,
data[rand == i,])
res[rand == i,] - res[rand == i,] + resmatrix(res[rand ==
i,],learn,data, rand, i)
}
}
factor(levels(truth)[max.col(res/nreps)], levels = levels(truth))
}



-- 
Christoph Lehmann [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] koq.q ---- Kent O' Quigley R2

2004-03-30 Thread Antonello Romani
Dear R-users,

I apply to your kind attention to know if someone have used the Splus software 
koq.q (Kent  O'Quigley's measure of dependence for censored data) in R and 
kindly can help me.

I have tried several times to contact the authors Andrej Blejec 
([EMAIL PROTECTED])  or Janez Stare ([EMAIL PROTECTED]) but 
unfortunately no one answered me. 

Following you'll see the function nlminb that i have changed with R-function 
optim() and the error that came out  when i try to run this software.
As attached file there is the file koq.q


Thanking in advance for what you can do about it

Yours Faithfully


Dr. Antonello Romani
Dipartimento di Medicina Sperimentale
Sezione di Patologia Molecolare e Immunologia
via Volturno 39
43100 Parma
Italy


#---
find.mu.alfa - function(theta, theta1, x, ell, which,...)
{
#
#   find theta=c(beta,mu,alfa) which maximize
#   Expected Log-Likelihood given by ell
#
#   Set lower and upper bounds for mu (-Inf,Inf)
#   and alfa (0,Inf)
#
lower - c(which, T, 0) * theta
lower[c(which, T, 0) == T] -  - Inf
upper - c(which, T, T) * theta
upper[c(which, T, T) == T] - Inf   #
optim(par=theta,fn=ell,method=L-BFGS-B,lower = lower, upper = upper, 
 x = x,theta1 =theta1)
#nlminb(start = theta, objective = ell, x = x,lower = lower, upper = 
upper, 
theta1 =theta1, ...)
}
#
#--

 
fit-cph(Surv(futime,fustat)~age,data=ovarian,x=T,y=T,surv=T,method=breslow,type=kaplan-meier)
 fit
Cox Proportional Hazards Model

cph(formula = Surv(futime, fustat) ~ age, data = ovarian, method = breslow,
x = T, y = T, surv = T, type = kaplan-meier)

   Obs Events Model L.R.   d.f.  P  ScoreScore P
26 12  14.29  1  2e-04  12.26  5e-04
R2
 0.454


 coef se(coef)z   p
age 0.162   0.0497 3.25 0.00116

koq(fit)
Beta  =  0
Beta1 =  0.1616199
Error in ELL(theta = theta0, theta1 = theta1, x = x) :
only 0's may mix with negative subscripts
In addition: Warning message:
Replacement length not a multiple of the elements to replace in matrix(...)
koq-
function(beta1, x = NULL, p = NULL, verbose = T)
{
#
#
check.parameters - function(beta1, x, p)
{
#   Check parameters and
#   determine variables to be tested
#
if(data.class(beta1) == cph) x - 
coxph.detail(beta1)$x
if(is.null(x))
stop(Independent variables (x) not set)
if(data.class(beta1) == coxreg || data.class(
beta1) == cph)
beta1 - beta1$coef
if(!(data.class(beta1) == numeric))
stop(Illegal parameter beta1 \n A vector of numeric 
coefficients or an object of class \coxreg\ expected
)
m - length(beta1)
if(is.null(p)) p - 1:m 
# p is a list of vars to be tested
if(max(p)  m | (min(p)  1  max(p)  1))
stop(paste(Illegal variable selected p=,
list(p)))
if(max(p) == 1  (min(p) == 0 | max(p) == 1)  
length(p) == length(beta1)) {
which - !p # p is indicator variable
}
else {
which - rep(T, m)
which[p] - F
}
beta - beta1 * which
list(beta = beta, beta1 = beta1, x = x, p = p, 
which = which)
}
#
#
find.mu.alfa - function(theta, theta1, x, ell, which, 
...)
{
#
#   find theta=c(beta,mu,alfa) which maximize 
#   Expected Log-Likelihood given by ell
#   
#   Set lower and upper bounds for mu (-Inf,Inf) 
#   and alfa (0,Inf)
#   
lower - c(which, T, 0) * theta
lower[c(which, T, 0) == T] -  - Inf
upper - c(which, T, T) * theta
upper[c(which, T, T) == T] - Inf   #   
optim(par=theta,ell,x = x,theta1 =theta1)
#nlminb(start = theta, objective = ell, x = x,
#   lower = lower, upper = upper, theta1 =
#   theta1, ...)
}
#
#
ELL - function(theta, theta1, x)
{
#
#   Expected Log-Likelihood function for the Weibull regression model
#   (see reference 1 in 

Re: [R] RAqua and gcc

2004-03-30 Thread Ingmar Visser
Hi Kosuke,
The building R from sources FAQ (version from jan 31,2004, can't seem to
find it on the web anymore), says that installing libwmf+iconv as part of
the teTex system causes trouble between gcc and R. You may try removing it
and install again.
I succesfully installed from source files from Raqua, which saves the
trouble of going to the terminal and finding the right directory etc.
Bye, ingmar

 From: Kosuke Imai [EMAIL PROTECTED]
 Date: Mon, 29 Mar 2004 23:21:58 -0500 (EST)
 To: [EMAIL PROTECTED]
 Subject: [R] RAqua and gcc
 
 Hi,
 I've recently purchased PowerBookG4 (panther) and installed RAqua 1.8.1.
 I also installed gcc version 3.3 through Xcode tools. But, for some
 reason, I'm having a hard time getting gcc work with R. For example, I get
 the following error while installing Hmisc package. I would appreciate any
 suggestion to fix this problem.
 Thanks
 Kosuke
 
 * Installing *source* package 'Hmisc' ...
 ** libs
 g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
 g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
 g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
 g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
 g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
 gcc -no-cpp-precomp -I/Applications/StartR.app/RAqua.app/Contents/include
 -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
 dyld: gcc version mismatch for library: /usr/local/lib/libiconv.2.dylib
 (compatibility version of user: 5.0.0 greater than library's version:
 4.0.0)
 make: *** [ranksort.o] Trace/BPT trap
 ERROR: compilation failed for package 'Hmisc'
 
 __
 [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] italian keyboard and ~ symbol

2004-03-30 Thread Federico Calboli
Dear All,

I would like to ask the following:

a colleague is using R 1.8.1 for Windows XP on his laptop. The keboard
is the standard Italian layout, which is missing the ~ (tilde) key. For
reasons unknown, typing Ctrl Alt 126, which I understand is the
standard ASCII code, does not produce the desired symbol (any
combination of keys seems to fail...)

Can anyone advice how to produce the ~ symbol, short of a copy/paste
from MS Word?

Regards,

Federico Calboli 


-- 



=

Federico C. F. Calboli

Dipartimento di Biologia
Via Selmi 3
40126 Bologna
Italy

tel (+39) 051 209 4187
fax (+39) 051 251 4286

f.calboli at ucl.ac.uk

__
[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: How transform excell file to text file in R

2004-03-30 Thread Michael Dewey
At 12:00 30/03/04 +0200, you wrote:
From: [EMAIL PROTECTED]
Precedence: list
MIME-Version: 1.0
Cc:
To: [EMAIL PROTECTED]
Date: Mon, 29 Mar 2004 17:22:14 -0300 (ART)
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;charset=iso-8859-1
Subject: [R] how transform excell file to text file in R
Message: 56
Hello, it want to know if there is a library that transform a file in
excell (*. xls) to text file(*.txt, *,prn, *.csv).  Thanks
library(RODBC) will read your Excel file into R. You do not need a copy of 
Excel to do this.

Michael Dewey
[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] italian keyboard and ~ symbol

2004-03-30 Thread Henrik Bengtsson
Press-Alt + Num1 + Num2 + Num6 + Release-Alt where Num1, Num2 
Num6 are 1, 2  6 on the *numeric keyboard* (not the ones above the
letter keys) will produce ASCII character 126 (~, tilde) on my WinXP
Pro in both Rterm and Rgui for R v1.8.1. Do you get anything at all?
Does it work in any other Windows applications or dialogs (you
mentioned Word)? What about Press-Alt + Num6 + Num5 + Release-Alt
(should give A)?

You could also consider remapping your keyboard, i.e. for some
physical key replace a useless/never used character with ~
(tilde). Some initial links can be found at
http://www.maths.lth.se/help/windows/keyboard/.

Cheers

Henrik

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Federico Calboli
 Sent: den 30 mars 2004 13:25
 To: r-help
 Subject: [R] italian keyboard and ~ symbol
 
 
 Dear All,
 
 I would like to ask the following:
 
 a colleague is using R 1.8.1 for Windows XP on his laptop. 
 The keboard is the standard Italian layout, which is missing 
 the ~ (tilde) key. For reasons unknown, typing Ctrl Alt 
 126, which I understand is the standard ASCII code, does not 
 produce the desired symbol (any combination of keys seems to
fail...)
 
 Can anyone advice how to produce the ~ symbol, short of a 
 copy/paste from MS Word?
 
 Regards,
 
 Federico Calboli 
 
 
 -- 
 
 
 
 =
 
 Federico C. F. Calboli
 
 Dipartimento di Biologia
 Via Selmi 3
 40126 Bologna
 Italy
 
 tel (+39) 051 209 4187
 fax (+39) 051 251 4286
 
 f.calboli at ucl.ac.uk
 
 __
 [EMAIL PROTECTED] mailing list 
 https://www.stat.math.ethz.ch/mailma n/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] italian keyboard and ~ symbol

2004-03-30 Thread Federico Calboli
On Tue, 2004-03-30 at 11:48, Henrik Bengtsson wrote:
 Press-Alt + Num1 + Num2 + Num6 + Release-Alt where Num1, Num2 
 Num6 are 1, 2  6 on the *numeric keyboard* (not the ones above the
 letter keys) will produce ASCII character 126 (~, tilde) on my WinXP
 Pro in both Rterm and Rgui for R v1.8.1. Do you get anything at all?
 Does it work in any other Windows applications or dialogs (you
 mentioned Word)? What about Press-Alt + Num6 + Num5 + Release-Alt
 (should give A)?

Rather annoyingly it does not work.
 
 You could also consider remapping your keyboard, i.e. for some
 physical key replace a useless/never used character with ~
 (tilde). Some initial links can be found at
 http://www.maths.lth.se/help/windows/keyboard/.
 

It appears it is the only option.

Regards,

Federico
-- 



=

Federico C. F. Calboli

Dipartimento di Biologia
Via Selmi 3
40126 Bologna
Italy

tel (+39) 051 209 4187
fax (+39) 051 251 4286

f.calboli at ucl.ac.uk

__
[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] italian keyboard and ~ symbol

2004-03-30 Thread Erich Neuwirth
Before using the sequence
Press-Alt + Num1 + Num2 + Num6 + Release-Alt
one has to make sure that the numeric keyboard is in NumLock mode,
not in cursor mode.
If it is in cursor mode, this trick will not work
(at least it does not on my machine)


Federico Calboli wrote:

On Tue, 2004-03-30 at 11:48, Henrik Bengtsson wrote:

Press-Alt + Num1 + Num2 + Num6 + Release-Alt where Num1, Num2 
Num6 are 1, 2  6 on the *numeric keyboard* (not the ones above the
letter keys) will produce ASCII character 126 (~, tilde) on my WinXP
Pro in both Rterm and Rgui for R v1.8.1. Do you get anything at all?
Does it work in any other Windows applications or dialogs (you
mentioned Word)? What about Press-Alt + Num6 + Num5 + Release-Alt
(should give A)?


Rather annoyingly it does not work.

You could also consider remapping your keyboard, i.e. for some
physical key replace a useless/never used character with ~
(tilde). Some initial links can be found at
http://www.maths.lth.se/help/windows/keyboard/.


It appears it is the only option.

Regards,

Federico
--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
__
[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] italian keyboard and ~ symbol

2004-03-30 Thread CENDOYA, Gabriela
Hi Federico:
Try Alt Gr (which is the Alt key on the right hand side of the space bar
key)+4 and that works on my XP.
Gabriela

__
[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] italian keyboard and ~ symbol

2004-03-30 Thread vfasciani
Usually in a laptop for using a keyboard as a numeric pad you must
activate this function or, in other ones, is only necessary to press
both Fn  Alt keys.

e.g. FnAlt pressed and j(1) k(2) o(6).

Saluti,
Vittorio


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Federico Calboli
Sent: Tuesday, March 30, 2004 1:25 PM
To: r-help
Subject: [R] italian keyboard and ~ symbol


Dear All,

I would like to ask the following:

a colleague is using R 1.8.1 for Windows XP on his laptop. The keboard
is the standard Italian layout, which is missing the ~ (tilde) key. For
reasons unknown, typing Ctrl Alt 126, which I understand is the
standard ASCII code, does not produce the desired symbol (any
combination of keys seems to fail...)

Can anyone advice how to produce the ~ symbol, short of a copy/paste
from MS Word?

Regards,

Federico Calboli 


-- 



=

Federico C. F. Calboli

Dipartimento di Biologia
Via Selmi 3
40126 Bologna
Italy

tel (+39) 051 209 4187
fax (+39) 051 251 4286

f.calboli at ucl.ac.uk

__
[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] italian keyboard and ~ symbol

2004-03-30 Thread vfasciani
Another way is to set italian and US keyboards
(Start--Settings--Regional and Language Options;
Languages--Details..) in order to quickly switch with AltShift.

Ari-saluti,
Vittorio

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of vfasciani
Sent: Tuesday, March 30, 2004 2:18 PM
To: [EMAIL PROTECTED]
Subject: RE: [R] italian keyboard and ~ symbol


Usually in a laptop for using a keyboard as a numeric pad you must
activate this function or, in other ones, is only necessary to press
both Fn  Alt keys.

e.g. FnAlt pressed and j(1) k(2) o(6).

Saluti,
Vittorio


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Federico Calboli
Sent: Tuesday, March 30, 2004 1:25 PM
To: r-help
Subject: [R] italian keyboard and ~ symbol


Dear All,

I would like to ask the following:

a colleague is using R 1.8.1 for Windows XP on his laptop. The keboard
is the standard Italian layout, which is missing the ~ (tilde) key. For
reasons unknown, typing Ctrl Alt 126, which I understand is the
standard ASCII code, does not produce the desired symbol (any
combination of keys seems to fail...)

Can anyone advice how to produce the ~ symbol, short of a copy/paste
from MS Word?

Regards,

Federico Calboli 


-- 



=

Federico C. F. Calboli

Dipartimento di Biologia
Via Selmi 3
40126 Bologna
Italy

tel (+39) 051 209 4187
fax (+39) 051 251 4286

f.calboli at ucl.ac.uk

__
[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] Console/command line output

2004-03-30 Thread Ingmar Visser
Hi all,
I am working on Macos x 10.3 (Panther) to build a package consisting of
C/C++ code that is called from R. In the C/C++-sources I use  several
commands to print info to the console:

std::cout  info  endl;

and: 

Rprintf(info\n);

Both work fine when R is run on the command line but neither works when
running Raqau (I did check the preference boxes for console and error output
to be written to the console).

Can anyone confirm this behavior of Raqua?
Any suggestions welcome,
Ingmar

platform powerpc-apple-darwin6.8
arch powerpc   
os   darwin6.8 
system   powerpc, darwin6.8
status 
major1 
minor8.1   
year 2003  
month11
day  21
language R

__
[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] italian keyboard and ~ symbol

2004-03-30 Thread Federico Calboli
On Tue, 2004-03-30 at 12:38, Erich Neuwirth wrote:
 Before using the sequence
 Press-Alt + Num1 + Num2 + Num6 + Release-Alt
 one has to make sure that the numeric keyboard is in NumLock mode,
 not in cursor mode.
 If it is in cursor mode, this trick will not work
 (at least it does not on my machine)
 

It worked! Many thanks!

Regards,

Federico


-- 



=

Federico C. F. Calboli

Dipartimento di Biologia
Via Selmi 3
40126 Bologna
Italy

tel (+39) 051 209 4187
fax (+39) 051 251 4286

f.calboli at ucl.ac.uk

__
[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] Console/command line output

2004-03-30 Thread Martin Maechler
 Ingmar == Ingmar Visser [EMAIL PROTECTED]
 on Tue, 30 Mar 2004 14:36:59 +0200 writes:

Ingmar Hi all, I am working on Macos x 10.3 (Panther) to
Ingmar build a package consisting of C/C++ code that is
Ingmar called from R. In the C/C++-sources I use several
Ingmar commands to print info to the console:

Ingmar std::cout  info  endl;

Ingmar and:

Ingmar Rprintf(info\n);

Ingmar Both work fine when R is run on the command line but
Ingmar neither works when running Raqau (I did check the
Ingmar preference boxes for console and error output to be
Ingmar written to the console).

Only the Rprintf() one is supposed to work `in all
circumstances';
if it doesn't work in Raqua (sic!  aqua is Latin for water),
that's a bug in at least one part of your computer environment.

Ingmar Can anyone confirm this behavior of Raqua?  Any
Ingmar suggestions welcome, Ingmar

Ingmar platform powerpc-apple-darwin6.8 arch powerpc os
Ingmar darwin6.8 system powerpc, darwin6.8 status major 1
Ingmar minor 8.1 year 2003 month 11 day 21 language R

__
[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] about fact.design

2004-03-30 Thread angel hellraiser
Hi R users:

In R for windows. is there any package to work, in experimental design?
With functions like in S-PLUS , fact.design and the other ones.
How to implement in R, all theory about experimental design, I'm talking 
about

ssType3, fact.design and the theory of orthogonal design, combinatory..

Thanks in advance and please excuse me, my european english.

My  e-mail is [EMAIL PROTECTED]

_
Encuentra a tu media naranja entre los perfiles que más te gusten. Toda la 
magia del romance en MSN Amor  Amistad. http://match.msn.es/

__
[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 R In a Cpp Project

2004-03-30 Thread boudenne, jb
Hi,

 

  I'am trying to use R in my Cpp project but I fail. 

 

 First I try to include R.h for loading statically R.dll but there is
conflict with windows definition of Error.

 

 Second, I try to use dynamically that Dll but, I can't use allocVector
(toto here). The error message said that I try to read a no allocate
zone.

 

This is my code.

 

typedef SEXP (*MYPROC)(SEXPTYPE,int);

MYPROC toto;

 

int _tmain(int argc, _TCHAR* argv[])

{  

  HINSTANCE hLib=LoadLibrary(R.DLL);

  if(hLib==NULL) {

   cout  Unable to load library!  endl;

   getch();

   return 0;

  }

  char mod[MAXMODULE];

  GetModuleFileName((HMODULE)hLib, (LPTSTR)mod, MAXMODULE);

  cout  Library loaded:   mod  endl;

  getch();

  toto=(MYPROC)GetProcAddress((HMODULE)hLib, Rf_allocVector);

  if((toto==NULL)) {

   cout  Unable to load function(s).  endl;

   FreeLibrary((HMODULE)hLib);

   return 1;

  }

   SEXP ab;// = new SEXPREC;

   ab = (toto) (REALXP,2);

 

}

 

Third I have download R COM.

 

I' am looking for counsel. Am I compulsory to use   R com or not?

If not how can I improve my code?

Do you have an idea?

 

JBB

 

 


[[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] about fact.design

2004-03-30 Thread angel hellraiser
Hi R-users:

Can I get the S-function fact.desig for experimentl design for like S-PLUS
In general , Is there software for R in windows about experimental design , 
say,
experimental design , ssType3 , combinatory, orthogonal design...and for 
sampling in finite population, Horwitz-Thompson sampling pps.
Thanks in advance.

_
¿Todavía no conoces el nuevo MSN Messenger? Descárgatelo gratis aquí.
__
[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] Where: package licenses

2004-03-30 Thread Jason . L . Higbee
R:

This stems from my curiosity about the previous thread about  a request 
for glm.nb code.  The issue of package licenses was brought up and I was 
hoping for some clarification on that.  Using the function license() or 
licence() gives info on the license for R, but something like 
license(MASS) does not give info on the license for the MASS package 
(perhaps it might be good to expand the license function in the way 
described).  A quick look on CRAN didn't yield any info on package 
licenses either. 


Thanks.

Jason Higbee
Research Associate
Federal Reserve Bank of St. Louis


[[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] as.environment() does not work for package:base?

2004-03-30 Thread Philippe Grosjean
Hello,

I want to retrieve one environment from the search path. I have:

 search()
 [1] .GlobalEnv  package:R2HTML  package:tcltk   package:methods
package:ctest
 [6] package:mva package:modreg  package:nls package:ts
Autoloads
[11] package:base
 as.environment(1)
environment: R_GlobalEnv
 as.environment(2)
environment: package:R2HTML
attr(,name)
[1] package:R2HTML
attr(,path)
[1] C:/PROGRA~1/R/rw1081/library/R2HTML
 as.environment(10)
environment: 01749504
attr(,name)
[1] Autoloads
 as.environment(11)
NULL
 as.environment(package:base)
NULL

So, everything works fine, except for package:base, the 11th entry. Is it
by purpose that as.environment() returns NULL? Is it because package:base
is sealed? Then, how do I get the environment corresponding to
package:base?

Thanks,

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] RAqua and gcc

2004-03-30 Thread Thomas Lumley
On Tue, 30 Mar 2004, Ingmar Visser wrote:

 Hi Kosuke,
 The building R from sources FAQ (version from jan 31,2004, can't seem to
 find it on the web anymore), says that installing libwmf+iconv as part of
 the teTex system causes trouble between gcc and R. You may try removing it
 and install again.

And this is exactly the error it causes.  If you don't have teTeX it may
be that something else has installed an incompatible version of libiconv.

-thomas


 I succesfully installed from source files from Raqua, which saves the
 trouble of going to the terminal and finding the right directory etc.
 Bye, ingmar

  From: Kosuke Imai [EMAIL PROTECTED]
  Date: Mon, 29 Mar 2004 23:21:58 -0500 (EST)
  To: [EMAIL PROTECTED]
  Subject: [R] RAqua and gcc
 
  Hi,
  I've recently purchased PowerBookG4 (panther) and installed RAqua 1.8.1.
  I also installed gcc version 3.3 through Xcode tools. But, for some
  reason, I'm having a hard time getting gcc work with R. For example, I get
  the following error while installing Hmisc package. I would appreciate any
  suggestion to fix this problem.
  Thanks
  Kosuke
 
  * Installing *source* package 'Hmisc' ...
  ** libs
  g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
  g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
  g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
  g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
  g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
  gcc -no-cpp-precomp -I/Applications/StartR.app/RAqua.app/Contents/include
  -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
  dyld: gcc version mismatch for library: /usr/local/lib/libiconv.2.dylib
  (compatibility version of user: 5.0.0 greater than library's version:
  4.0.0)
  make: *** [ranksort.o] Trace/BPT trap
  ERROR: compilation failed for package 'Hmisc'
 
  __
  [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


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

__
[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] Where: package licenses

2004-03-30 Thread Marc Schwartz
On Tue, 2004-03-30 at 08:51, [EMAIL PROTECTED] wrote: 
 R:
 
 This stems from my curiosity about the previous thread about  a
 request 
 for glm.nb code.  The issue of package licenses was brought up and I
 was 
 hoping for some clarification on that.  Using the function license()
 or 
 licence() gives info on the license for R, but something like 
 license(MASS) does not give info on the license for the MASS package 
 (perhaps it might be good to expand the license function in the way 
 described).  A quick look on CRAN didn't yield any info on package 
 licenses either. 


For the CRAN add on packages (which includes the 'recommended'
packages), each has the license information under the description. For
example, MASS which is part of the VR bundle, is here:

http://cran.r-project.org/src/contrib/PACKAGES.html#VR

The information is as follows:

...
License: GPL (version 2 or later)
...

Some of the packages are released under other licenses or have
restrictions on commercial use or distribution. Read each one carefully.

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


Re: [R] Where: package licenses

2004-03-30 Thread Thomas Lumley
On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:

 R:

 This stems from my curiosity about the previous thread about  a request
 for glm.nb code.  The issue of package licenses was brought up and I was
 hoping for some clarification on that.  Using the function license() or
 licence() gives info on the license for R, but something like
 license(MASS) does not give info on the license for the MASS package
 (perhaps it might be good to expand the license function in the way
 described).  A quick look on CRAN didn't yield any info on package
 licenses either.

The DESCRIPTION file for a package lists the license; this is also given
in the CRAN entry for each package.

-thomas

__
[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] Runing S-plus add-on in R (Binary and Smoothed Binary Regression Quantiles)

2004-03-30 Thread Thomas Lumley
On Tue, 30 Mar 2004, Joao Pedro W. de Azevedo wrote:

 Hello,
 I would like to know if it is possible to run a s-plus package in R. I'm
 particularly interested on
 The add-on written by Walter Belluzzo and Gregory Kordas to estimate Binary
 and Smoothed Binary Regression Quantiles using the Simulated Annealing
 algorithm.

In my experience most substantial pieces of S-PLUS code require some
editing to work in R, but often not very much.  It is, of course, easier
if the authors have provided enough tests that you can tell whether the
package is working...

-thomas

__
[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] Where: package licenses

2004-03-30 Thread Jason . L . Higbee
Thanks Thomas and Marc that is what I was looking for.

-Jason




The DESCRIPTION file for a package lists the license; this is also given
in the CRAN entry for each package.

 -thomas





Marc Schwartz [EMAIL PROTECTED]
03/30/2004 09:02 AM
Please respond to MSchwartz

 
To: [EMAIL PROTECTED]
cc: R-Help [EMAIL PROTECTED]
Subject:Re: [R] Where: package licenses

On Tue, 2004-03-30 at 08:51, [EMAIL PROTECTED] wrote: 
 R:
 
 This stems from my curiosity about the previous thread about  a
 request 
 for glm.nb code.  The issue of package licenses was brought up and I
 was 
 hoping for some clarification on that.  Using the function license()
 or 
 licence() gives info on the license for R, but something like 
 license(MASS) does not give info on the license for the MASS package 
 (perhaps it might be good to expand the license function in the way 
 described).  A quick look on CRAN didn't yield any info on package 
 licenses either. 


For the CRAN add on packages (which includes the 'recommended'
packages), each has the license information under the description. For
example, MASS which is part of the VR bundle, is here:

http://cran.r-project.org/src/contrib/PACKAGES.html#VR

The information is as follows:

...
License: GPL (version 2 or later)
...

Some of the packages are released under other licenses or have
restrictions on commercial use or distribution. Read each one carefully.

HTH,

Marc Schwartz





[[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] Where: package licenses

2004-03-30 Thread Sundar Dorai-Raj
You can access this from within R using

package.description(MASS)[[License]]

package.description attempts to parse the DESCRIPTION file.

-sundar

[EMAIL PROTECTED] wrote:
Thanks Thomas and Marc that is what I was looking for.

-Jason



The DESCRIPTION file for a package lists the license; this is also given
in the CRAN entry for each package.
 -thomas





Marc Schwartz [EMAIL PROTECTED]
03/30/2004 09:02 AM
Please respond to MSchwartz
 
To: [EMAIL PROTECTED]
cc: R-Help [EMAIL PROTECTED]
Subject:Re: [R] Where: package licenses

On Tue, 2004-03-30 at 08:51, [EMAIL PROTECTED] wrote: 

R:

This stems from my curiosity about the previous thread about  a
request 
for glm.nb code.  The issue of package licenses was brought up and I
was 
hoping for some clarification on that.  Using the function license()
or 
licence() gives info on the license for R, but something like 
license(MASS) does not give info on the license for the MASS package 
(perhaps it might be good to expand the license function in the way 
described).  A quick look on CRAN didn't yield any info on package 
licenses either. 


For the CRAN add on packages (which includes the 'recommended'
packages), each has the license information under the description. For
example, MASS which is part of the VR bundle, is here:
http://cran.r-project.org/src/contrib/PACKAGES.html#VR

The information is as follows:

...
License: GPL (version 2 or later)
...
Some of the packages are released under other licenses or have
restrictions on commercial use or distribution. Read each one carefully.
HTH,

Marc Schwartz





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


[R] convert *.xls to text

2004-03-30 Thread solares
Hi, really i cant save *.xls to *.txt or *.csv because the file coming in
real time, i need a library or programa what to transform in real time
*.xls to tex file. Ruben

__
[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] convert *.xls to text

2004-03-30 Thread Shawn Way
Your best bet is RODBC then. The file can stay open, but you can run queries
even with the files open.  Just need to learn a little SQL..

Shawn Way, PE
Engineering Manager
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 9:55 AM
To: [EMAIL PROTECTED]
Subject: [R] convert *.xls to text


Hi, really i cant save *.xls to *.txt or *.csv because the file coming in
real time, i need a library or programa what to transform in real time *.xls
to tex file. Ruben

__
[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] convert *.xls to text

2004-03-30 Thread Whit Armstrong
Has anyone looked into using the Jakarta POI to save R data directly to xls
format?

http://jakarta.apache.org/poi/index.html

One of the advantages of POI over the DCOM interface is that one could use
unix/linux platforms to generate excel files / reports.

I would be interested in collaborating with anyone who has a serious
interest in building an R package for this purpose.

Thanks,
Whit

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 10:55 AM
To: [EMAIL PROTECTED]
Subject: [R] convert *.xls to text


Hi, really i cant save *.xls to *.txt or *.csv because the file coming in
real time, i need a library or programa what to transform in real time *.xls
to tex file. Ruben

__
[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] Where: package licenses

2004-03-30 Thread James MacDonald
Note that package.descripton() is deprecated in R-1.9.0. You have to use
packageDescription() instead.

Jim



James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

 Sundar Dorai-Raj [EMAIL PROTECTED] 03/30/04 10:51AM 

You can access this from within R using

package.description(MASS)[[License]]

package.description attempts to parse the DESCRIPTION file.

-sundar

[EMAIL PROTECTED] wrote:
 Thanks Thomas and Marc that is what I was looking for.
 
 -Jason
 
 
 
 
 The DESCRIPTION file for a package lists the license; this is also
given
 in the CRAN entry for each package.
 
  -thomas
 
 
 
 
 
 Marc Schwartz [EMAIL PROTECTED]
 03/30/2004 09:02 AM
 Please respond to MSchwartz
 
  
 To: [EMAIL PROTECTED] 
 cc: R-Help [EMAIL PROTECTED]
 Subject:Re: [R] Where: package licenses
 
 On Tue, 2004-03-30 at 08:51, [EMAIL PROTECTED] wrote: 
 
R:

This stems from my curiosity about the previous thread about  a
request 
for glm.nb code.  The issue of package licenses was brought up and I
was 
hoping for some clarification on that.  Using the function license()
or 
licence() gives info on the license for R, but something like 
license(MASS) does not give info on the license for the MASS package

(perhaps it might be good to expand the license function in the way 
described).  A quick look on CRAN didn't yield any info on package 
licenses either. 
 
 
 
 For the CRAN add on packages (which includes the 'recommended'
 packages), each has the license information under the description.
For
 example, MASS which is part of the VR bundle, is here:
 
 http://cran.r-project.org/src/contrib/PACKAGES.html#VR 
 
 The information is as follows:
 
 ...
 License: GPL (version 2 or later)
 ...
 
 Some of the packages are released under other licenses or have
 restrictions on commercial use or distribution. Read each one
carefully.
 
 HTH,
 
 Marc Schwartz
 
 
 
 
 
   [[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

__
[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] convert *.xls to text

2004-03-30 Thread Gabor Grothendieck
 solares at unsl.edu.ar writes:
 Hi, really i cant save *.xls to *.txt or *.csv because the file coming in
 real time, i need a library or programa what to transform in real time
 *.xls to tex file. Ruben


1. There was a post last month on r-help regarding this batch converter:
http://www.analytics.washington.edu/statcomp/downloads/xls2csv

2. Googling for 
xls to csv 
will likely locate other alternatives too.

3. You can read the .xls directly into R as shown in the R Data Import/Export
manual and then write it out as a text file.

__
[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] unexpected behavior in plot

2004-03-30 Thread Arditi, Aries

I'm having difficulty getting plot to work with type=n, when either the x or y 
variables is a factor.

For example,

x - 1:10
y - 1:10

plot(x, as.factor(y), type=n)
plot(as.factor(x),y, type=n)
plot(y ~ as.factor(x), type=n)

produce plots with data plotted, whereas

plot(x,y, type=n) 
plot(y ~ x, type = n)

produce the expected dataless plots

I am running R1.8.1 on Windows (xp), with the windows graphics device.

I have a friend who has tried this on a Mac (OS 10.3.3. with quartz() and x11() 
devices) and gets erratic behavior, i.e. sometimes plots works as expected, and 
sometimes not.

Does anyone have any clues on this?

Thanks in advance,


Aries Arditi, Ph.D.
Senior Fellow in Vision Science
Arlene R. Gordon Research Institute
Lighthouse International
111 East 59th Street
New York, NY 10022

Tel: +1 212 821 9500 (direct)
Fax: +1 212 751 9667
http://www.lighthouse.org/research_staff_arditi.htm

__
[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] convert *.xls to text

2004-03-30 Thread Dirk Eddelbuettel
On Tue, Mar 30, 2004 at 11:02:23AM -0500, Whit Armstrong wrote:
 Has anyone looked into using the Jakarta POI to save R data directly to xls
 format?
 
 http://jakarta.apache.org/poi/index.html
 
 One of the advantages of POI over the DCOM interface is that one could use
 unix/linux platforms to generate excel files / reports.

There are other (non-Java) possibilities:

-- Spreadsheet::WriteExcel is Perl and works whereever Perl works, there is a
   sibbling Spreadsheet::ParseExcel too. Greg Warnes has built another
   xls2csv around this.

-- Gretl (http://gretl.sf.net) has an add-on module for reading .xls that has
   been lifted from other Open Source projects; one could probably build
   something around the libole2 library from the Gnome project.

 I would be interested in collaborating with anyone who has a serious
 interest in building an R package for this purpose.

I would second that, but I really have no spare capacity for more new
projects. I'd try to help, though.

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] Where: package licenses

2004-03-30 Thread Douglas Bates
Thomas Lumley [EMAIL PROTECTED] writes:

 On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:
 
  R:
 
  This stems from my curiosity about the previous thread about  a request
  for glm.nb code.  The issue of package licenses was brought up and I was
  hoping for some clarification on that.  Using the function license() or
  licence() gives info on the license for R, but something like
  license(MASS) does not give info on the license for the MASS package
  (perhaps it might be good to expand the license function in the way
  described).  A quick look on CRAN didn't yield any info on package
  licenses either.
 
 The DESCRIPTION file for a package lists the license; this is also given
 in the CRAN entry for each package.

and in the result of

help(package = MASS)

__
[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] unexpected behavior in plot

2004-03-30 Thread Uwe Ligges
Arditi, Aries wrote:
I'm having difficulty getting plot to work with type=n, when either the x or y variables is a factor.

For example,

x - 1:10
y - 1:10
plot(x, as.factor(y), type=n)
plot(as.factor(x),y, type=n)
plot(y ~ as.factor(x), type=n)
produce plots with data plotted, whereas

plot(x,y, type=n) 
plot(y ~ x, type = n)

produce the expected dataless plots

I am running R1.8.1 on Windows (xp), with the windows graphics device.

I have a friend who has tried this on a Mac (OS 10.3.3. with quartz() and x11() devices) and gets erratic behavior, i.e. sometimes plots works as expected, and sometimes not.

Does anyone have any clues on this?


Yes: If x is a factor, boxplot() is called by plot.factor(), the 
corresponding method for the generic plot().
boxplot() does not care about type=n.

Uwe Ligges



Thanks in advance,

Aries Arditi, Ph.D.
Senior Fellow in Vision Science
Arlene R. Gordon Research Institute
Lighthouse International
111 East 59th Street
New York, NY 10022
Tel: +1 212 821 9500 (direct)
Fax: +1 212 751 9667
http://www.lighthouse.org/research_staff_arditi.htm
__
[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] add a column to an exported data.frame

2004-03-30 Thread Rogério Rosa da Silva
Dears R users,

Is there a way to add a column of results to an exported data.frame (exported 
with write) ?

Thanks

Rogério

__
[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] about fact.design

2004-03-30 Thread kjetil
On 30 Mar 2004 at 14:51, angel hellraiser wrote:

You can have a look at libraries AlgDesign
and conf.design, both on 
CRAN.

Kjetil Halvorsen

 Hi R-users:
 
 Can I get the S-function fact.desig for experimentl design for like
 S-PLUS In general , Is there software for R in windows about
 experimental design , say, experimental design , ssType3 ,
 combinatory, orthogonal design...and for sampling in finite
 population, Horwitz-Thompson sampling pps. Thanks in advance.
 
 _
 ¿Todavía no conoces el nuevo MSN Messenger? Descárgatelo gratis aquí.
 
 __
 [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] Sweave and graphic output locations

2004-03-30 Thread Max_Kuhn

Hello,

I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools package.

I am attempting to have Sweave write files to a different directory via:

testfile - system.file(Sweave, Sweave-test-1.Rnw,
package = tools)

## create a LaTeX file
Sweave(
  testfile,
  output = C:/temp/Sweave-test-1.tex,
  stylepath = FALSE
  )

but it places the graphics files in the working directory.

Does anyone have any ideas on getting all of the files in one place
(automatically)? The include option says:

include: logical (TRUE), indicating whether input statements for text
output and includegraphics statements for figures should be auto-generated.
Use include=FALSE if the output should appear in a different place than the
code chunk (by placing the input line manually).

If this is the solution, the default value should already be resolving it
(correct?). I'd try setting it to FALSE, but it's not clear how to call
this option.

Thanks in advance,

Max




**
This message is intended only for the designated recipient(s...{{dropped}}

__
[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] convert *.xls to text

2004-03-30 Thread Duncan Murdoch
On Tue, 30 Mar 2004 11:02:23 -0500, Whit Armstrong
[EMAIL PROTECTED] wrote :

Has anyone looked into using the Jakarta POI to save R data directly to xls
format?

http://jakarta.apache.org/poi/index.html

One of the advantages of POI over the DCOM interface is that one could use
unix/linux platforms to generate excel files / reports.

I would be interested in collaborating with anyone who has a serious
interest in building an R package for this purpose.

It's much easier to write Excel compatible files than it is to read
them, because you only need to be able to handle a small subset of the
possibilities:  you can skip formulas, graphs, etc.

This should be relatively easy to do using the connection code.  You
can probably find sufficient documentation of the format on
wotsit.org, or from OpenOffice or POI.  Those sources are generally
somewhat obsolete (MS likes to keep updating the format), but for
output purposes they should be fine.

I think it would be preferable to do this all in R, rather than mixing
R and Java, if the goals were relatively modest.  If you want full
read/write access, then it would make more sense to rely on someone
else's work (e.g. POI or ODBC).

Duncan Murdoch

__
[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] Sweave and graphic output locations

2004-03-30 Thread Stefano Calza
Hi,
you can use \SweaveOpts{prefix.string=foo/bar}
So you'll have your graphs put into directory foo and named bar-*

HIH,
Stefano

On Tue, Mar 30, 2004 at 12:31:36PM -0500, [EMAIL PROTECTED] wrote:
 
 Hello,
 
 I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools package.
 
 I am attempting to have Sweave write files to a different directory via:
 
 testfile - system.file(Sweave, Sweave-test-1.Rnw,
 package = tools)
 
 ## create a LaTeX file
 Sweave(
   testfile,
   output = C:/temp/Sweave-test-1.tex,
   stylepath = FALSE
   )
 
 but it places the graphics files in the working directory.
 
 Does anyone have any ideas on getting all of the files in one place
 (automatically)? The include option says:
 
 include: logical (TRUE), indicating whether input statements for text
 output and includegraphics statements for figures should be auto-generated.
 Use include=FALSE if the output should appear in a different place than the
 code chunk (by placing the input line manually).
 
 If this is the solution, the default value should already be resolving it
 (correct?). I'd try setting it to FALSE, but it's not clear how to call
 this option.
 
 Thanks in advance,
 
 Max
 
 
 
 
 **
 This message is intended only for the designated recipient(s...{{dropped}}
 
 __
 [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] DataEntryWindow

2004-03-30 Thread Jean Eid
When I originally posted my question under ( C-c C-c does not kill data
editor), I thought that it was a problem with ESS rather than R. However,
I have tried to do the same from a command line R (R 1.8.1 (2003-11-21).
on a debian  testing i386 machine) and I got the same problem.
Specifically I cannot kill the DataEntryWindow by issuing C-c (control c).
However, unless I issue the C-c command the data.frame will be printed on
the buffer when its killed  with the mouse.  moreover, I need to refresh
the screen everytime I  tab away from the dataentrywindow in order to be able to view
its content again ( C-l).

I issued the following commands.

edit(as.data.frame(matrix(rnorm(100), nrow=10)))
C-c

The DataEntryWindow is still present but when I manually (by mouse) kill
it, it does not print in the buffer.

Any help is greatly appreciated.

This is what XFree86 -version gives:

XFree86 Version 4.2.1.1 (Debian 4.2.1-12.1 20031003005825
[EMAIL PROTECTED]) / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 October 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.21-rc1-ac1-cryptoloop i686 [ELF]
Module Loader present

__
[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] add a column to an exported data.frame

2004-03-30 Thread Liaw, Andy
If this is on [U,Li]nix, you can write the extra column(s) to another file,
then use the `paste' command (see man paste) to do that at the shell prompt.
If you're on Windows, you can try to find a version of `paste' that works on
Windows.

HTH,
Andy

 From: Rogério Rosa da Silva
 
 Dears R users,
 
 Is there a way to add a column of results to an exported 
 data.frame (exported 
 with write) ?
 
 Thanks
 
 Rogério
 
 __
 [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] BoxPlots, 1 Way ANOVA and Non-Statisticians.

2004-03-30 Thread Carlos J. Gil Bellosta
Dear R-Helpers,

I am working in a project and I have a number of observations belonging 
to several classes. Using a 1 Way ANOVA, I have rejected the equality of 
means hypothesis with a very small p-value. However, the people I have 
to present my results to are not statisticians and they are not very 
likely to be much impressed by a 1.32434e-12 like number/thing.

Therefore I have decided to make to boxplots, one for the actual data 
and the second one for simulated data where the equality of the means 
holds so that the difference in the distributions can be visually 
appreciated.

The problem is that, for the simulated values, being more regular, the 
range of variation is smaller and, therefore, the heigth of the window 
where their boxplot is drawn is also smaller. As a result, the scales of 
the two boxplots are not the same and part of the appeal of the visual 
approach is lost in the way.

My question is, is there a way to make two different boxplots within a 
common window? (Or rather, a common size window or, more concretely, 
so that it spans over the same range on the vertical axis).

Sincerely,

Carlos J. Gil Bellosta
Sigma Consultores Estadi'sticos
http://www.consultoresestadisticos.com
__
[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] Where: package licenses

2004-03-30 Thread Prof Brian Ripley
On 30 Mar 2004, Douglas Bates wrote:

 Thomas Lumley [EMAIL PROTECTED] writes:
 
  On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:
  
   R:
  
   This stems from my curiosity about the previous thread about  a request
   for glm.nb code.  The issue of package licenses was brought up and I was
   hoping for some clarification on that.  Using the function license() or
   licence() gives info on the license for R, but something like
   license(MASS) does not give info on the license for the MASS package
   (perhaps it might be good to expand the license function in the way
   described).  A quick look on CRAN didn't yield any info on package
   licenses either.
  
  The DESCRIPTION file for a package lists the license; this is also given
  in the CRAN entry for each package.
 
 and in the result of
 
 help(package = MASS)

Also, MASS (like many other packages) installs a file called LICENCE (it's 
in English ...) in its top-level directory.  

My point is that you are not allowed to redistribute even parts of it
without the licence, and that is what the original requestor was
explicitly asking for.

-- 
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] BoxPlots, 1 Way ANOVA and Non-Statisticians.

2004-03-30 Thread Chuck Cleland
Carlos:
  You could just give the same values for the ylim argument in each 
boxplot

 par(mfrow=c(1,2), las=1)
 boxplot(rnorm(10), rnorm(10), rnorm(10), ylim=c(-3,3))
 boxplot(rnorm(10, 0.5, 1), rnorm(10, -.5, 1), rnorm(10), ylim=c(-3,3))
Carlos J. Gil Bellosta wrote:
I am working in a project and I have a number of observations belonging 
to several classes. Using a 1 Way ANOVA, I have rejected the equality of 
means hypothesis with a very small p-value. However, the people I have 
to present my results to are not statisticians and they are not very 
likely to be much impressed by a 1.32434e-12 like number/thing.

Therefore I have decided to make to boxplots, one for the actual data 
and the second one for simulated data where the equality of the means 
holds so that the difference in the distributions can be visually 
appreciated.

The problem is that, for the simulated values, being more regular, the 
range of variation is smaller and, therefore, the heigth of the window 
where their boxplot is drawn is also smaller. As a result, the scales of 
the two boxplots are not the same and part of the appeal of the visual 
approach is lost in the way.

My question is, is there a way to make two different boxplots within a 
common window? (Or rather, a common size window or, more concretely, 
so that it spans over the same range on the vertical axis).
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894
__
[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] Sweave and graphic output locations

2004-03-30 Thread Achim Zeileis
On Tue, 30 Mar 2004 12:31:36 -0500 [EMAIL PROTECTED] wrote:

 
 Hello,
 
 I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools
 package.
 
 I am attempting to have Sweave write files to a different directory
 via:
 
 testfile - system.file(Sweave, Sweave-test-1.Rnw,
 package = tools)
 
 ## create a LaTeX file
 Sweave(
   testfile,
   output = C:/temp/Sweave-test-1.tex,
   stylepath = FALSE
   )
 
 but it places the graphics files in the working directory.

I guess the simplest workaround is to change the working directory
before you call Sweave(), i.e.
  setwd(C:/temp/)
  Sweave(testfile, output = myfile.tex, stylepath = FALSE)
 
 Does anyone have any ideas on getting all of the files in one place
 (automatically)? The include option says:
 
 include: logical (TRUE), indicating whether input statements for text
 output and includegraphics statements for figures should be
 auto-generated. Use include=FALSE if the output should appear in a
 different place than the code chunk (by placing the input line
 manually).

This is about the 
  \includegraphics{}
statement within the TeX file. Of course you can set each one of these
explicitely giving the full path to the graphics file, but I guess this
is rather cumbersome.

 If this is the solution, the default value should already be resolving
 it(correct?). I'd try setting it to FALSE, but it's not clear how to
 call this option.

You need to do that in the .Rnw file, e.g.

fig = TRUE, include = FALSE=
plot(1:10)
@
 
hth
Z

 Thanks in advance,
 
 Max
 
 
 
 
 **
 This message is intended only for the designated
 recipient(s...{{dropped}}
 
 __
 [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] Course***R/Splus Programming Techniques in Boston

2004-03-30 Thread elvis

__
[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] Data Grouping Question

2004-03-30 Thread Kissell, Robert [EQRE]
Hi,

I have a quick question regarding grouping data in R. I have the following matrix,

A = 0   1   1   0
1   0   0   1
1   0   0   1
1   1   0   0
1   0   0   1
0   1   1   0

I would like to learn how I can group the data on unique rows of A and also count the 
number of times the row occurred. The command unique(A) provides a matrix with the 
unique rows, i.e., B

B = 0   1   1   0
1   0   0   1
1   1   0   0

but I am also interested in learning how I can count the number of unque rows too. The 
result can be in either one or two matrices, e.g.,

B = 0   1   1   0
1   0   0   1
1   1   0   0

Count = 1
3
2

or,

C = 0   1   1   0   1
1   0   0   1   3
1   1   0   0   2

Thanks in advance.

Rob Kissell
[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] Data Grouping Question

2004-03-30 Thread Chuck Cleland
Here is a way, though probably not the best way:

table(apply(A, 1, function(x){paste(x, collapse=)}))

Kissell, Robert [EQRE] wrote:

Hi,

I have a quick question regarding grouping data in R. I have the following matrix,

A = 0   1   1   0
1   0   0   1
1   0   0   1
1   1   0   0
1   0   0   1
0   1   1   0
I would like to learn how I can group the data on unique rows of A and also count the number of times the row occurred. The command unique(A) provides a matrix with the unique rows, i.e., B

B = 0   1   1   0
1   0   0   1
1   1   0   0
but I am also interested in learning how I can count the number of unque rows too. The result can be in either one or two matrices, e.g.,

B = 0   1   1   0
1   0   0   1
1   1   0   0
Count = 1
3
2
or,

C = 0   1   1   0   1
1   0   0   1   3
1   1   0   0   2
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894
__
[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] Aggregating frequency of irregular time series

2004-03-30 Thread Patrick Burns
Assuming that you are using log returns, one approach (probably
not the best) is to convert the dates to julian days, find all of the
Sundays spanning the dates in the series, then do something along
the lines of:
tapply(the.log.returns, cut(julian.days, sundays), sum)

Patrick Burns

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

S-Plus has the function AggregateSeries() whose name is self
explanatory.  For instance one can derive monthly series from daily
ones by specifying end-of-period, averages, sums, etc.  I looked for
a similar function in the packages its and tseries, but found
nothing.  I also help.searched() for aggregate to no avail.  Would
anybody be so kind to point me in the right direction?
   

I once needed a function which would convert daily stock prices into
weekly returns. I know, the code is pretty bad (it is all loops and
it's very slow), but my knowledge of R is weak and I really needed it,
so I just used brute force. See EOF for the function. Gabor and Dirk
and Brian Ripley and others on the list were very helpful to me in
getting to the point where I could write this, though obviously they
should not be blamed for my bad code! :-)
I would be very happy if listers could give me ideas on how to do this
better.
Daily to monthly is innately easier since months are 'more normal'
than weeks. I have perl code which does this, which supports 2 cases:
Reporting the last traded price (LTP) of the month versus reporting
the average of the month. If this is useful to you, ask me.
What are the specialised finance libraries available with S-Plus? Can
one marry R with commercial S libraries? I don't like having a
dependence on commercial code, but I might be willing to compromise
and buy libraries that work with R.
Thanks,

 

__
[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] Aggregating frequency of irregular time series

2004-03-30 Thread Whit Armstrong
This function will probably work for you if your dates are in the format
mmdd.  Use it to convert the series from daily to monthly, then use a 1
period difference to calc the returns of the series.

Feel free to contact me off list with any questions.


Dates - function(x) rownames(x)

Timebase - function(x,monthly=T,first.day=T) {
if(length(dim(x))!=2) stop(can only take 2 dimensional data.)

seriesDates - as.integer(Dates(x))

# year and Month
seriesYM - as.integer(seriesDates/100)
seriesYM.unique - sort(unique(seriesYM))
ans.nrow - length(seriesYM.unique)

# loop through all the unique months and grab the max day of month
ans - matrix(NA,nrow=ans.nrow,ncol=ncol(x))
ans.dates - vector(numeric,ans.nrow)

for (i in 1:ans.nrow) {

this.month - seriesYM == seriesYM.unique[i]
max.day - max(seriesDates[this.month]) 
ans.dates[i] - max.day
}


colnames(ans) - colnames(x)
ans[] - x[as.character(ans.dates),]

if(first.day==T) {
rownames(ans) -
paste(substring(as.character(ans.dates),1,6),01,sep=)
} else {
rownames(ans) - ans.dates
}

as.tseries(ans)
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns
Sent: Tuesday, March 30, 2004 2:37 PM
To: Ajay Shah
Cc: [EMAIL PROTECTED]; Ivan Alves
Subject: Re: [R] Aggregating frequency of irregular time series


Assuming that you are using log returns, one approach (probably not the
best) is to convert the dates to julian days, find all of the Sundays
spanning the dates in the series, then do something along the lines of:

tapply(the.log.returns, cut(julian.days, sundays), sum)


Patrick Burns

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

Ajay Shah wrote:

S-Plus has the function AggregateSeries() whose name is self 
explanatory.  For instance one can derive monthly series from daily 
ones by specifying end-of-period, averages, sums, etc.  I looked for a 
similar function in the packages its and tseries, but found 
nothing.  I also help.searched() for aggregate to no avail.  Would 
anybody be so kind to point me in the right direction?



I once needed a function which would convert daily stock prices into 
weekly returns. I know, the code is pretty bad (it is all loops and 
it's very slow), but my knowledge of R is weak and I really needed it, 
so I just used brute force. See EOF for the function. Gabor and Dirk 
and Brian Ripley and others on the list were very helpful to me in 
getting to the point where I could write this, though obviously they 
should not be blamed for my bad code! :-)

I would be very happy if listers could give me ideas on how to do this 
better.

Daily to monthly is innately easier since months are 'more normal' than 
weeks. I have perl code which does this, which supports 2 cases: 
Reporting the last traded price (LTP) of the month versus reporting the 
average of the month. If this is useful to you, ask me.

What are the specialised finance libraries available with S-Plus? Can 
one marry R with commercial S libraries? I don't like having a 
dependence on commercial code, but I might be willing to compromise and 
buy libraries that work with R.

Thanks,

  


__
[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] as.environment() does not work for package:base?

2004-03-30 Thread Prof Brian Ripley
NULL is the correct answer: as an environment base is denoted by NULL.
Did you think to try

ls(envir=NULL)

?  If not, do so now.

On Tue, 30 Mar 2004, Philippe Grosjean wrote:

 Hello,
 
 I want to retrieve one environment from the search path. I have:
 
  search()
  [1] .GlobalEnv  package:R2HTML  package:tcltk   package:methods
 package:ctest
  [6] package:mva package:modreg  package:nls package:ts
 Autoloads
 [11] package:base
  as.environment(1)
 environment: R_GlobalEnv
  as.environment(2)
 environment: package:R2HTML
 attr(,name)
 [1] package:R2HTML
 attr(,path)
 [1] C:/PROGRA~1/R/rw1081/library/R2HTML
  as.environment(10)
 environment: 01749504
 attr(,name)
 [1] Autoloads
  as.environment(11)
 NULL
  as.environment(package:base)
 NULL
 
 So, everything works fine, except for package:base, the 11th entry. Is it
 by purpose that as.environment() returns NULL? Is it because package:base
 is sealed? Then, how do I get the environment corresponding to
 package:base?
 
 Thanks,
 
 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
 
 

-- 
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] rank() vs SAS proc rank

2004-03-30 Thread White . Denis




SAS proc rank has ties options of high and low that would allow
producing ranks of the type found in the sports pages, e.g.,

rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7

Could R support these ties.methods?

__
[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] Data Grouping Question

2004-03-30 Thread Gabor Grothendieck
Kissell, Robert [EQRE] robert.kissell at citigroup.com writes:

 I would like to learn how I can group the data on unique rows of A and also 
count the number of times the row
 occurred. 

You have already provided the answer, unique(A), to the first part of your
question.  Here are two solutions to the second part:

1. Since each row can be regarded as the representation of a binary
number:

 table(A%*%2^(0:3))

2. Another possibility not dependent on the binary nature of the
data is to define:

 %+.*% - function(a,b)apply(b,2,function(x)apply(t(a) == x,2,all))

This function is the +.x of APL.  It defines an infix function that does a
matrix multiply of matrix a and matrix b except it replaces the usual inner
product of two vectors x and y with all(x==y).

In terms of this function, the answer is:

 colSums( A %+.*% t(unique(A)) )

__
[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] rank() vs SAS proc rank

2004-03-30 Thread Gabor Grothendieck
 White.Denis at epamail.epa.gov writes:

 SAS proc rank has ties options of high and low that would allow
 rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
 Could R support these ties.methods?

Don't know how SAS works but for your vector:

 z - c(1,1,2,2,2,2,3)
 match(z,z)
[1] 1 1 3 3 3 3 7

__
[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] exact logistic regression facilities in R?

2004-03-30 Thread Roger Levy
Hi,

Does R have any facilities for exact logistic regression?

Many thanks,

Roger

__
[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] rank() vs SAS proc rank

2004-03-30 Thread Rolf Turner
Gabor Grothendieck writes:

 White.Denis at epamail.epa.gov writes:
  SAS proc rank has ties options of high and low that would allow
  rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
  Could R support these ties.methods?

 Don't know how SAS works but for your vector:
 
  z - c(1,1,2,2,2,2,3)
  match(z,z)
 [1] 1 1 3 3 3 3 7

Ah, but if z isn't presorted, then it worketh not:

E.g.

 w - c(2,2,2,1,3,1,2)
 match(w,w)
[1] 1 1 1 4 5 4 1

Try
 bar - function(x) {
o - order(x)
x - x[o]
match(x,x)[order(o)]
 }

Then
 bar(w)
[1] 3 3 3 1 7 1 3

which ***is*** what's wanted.  I have not tested this idea any
further. :-)

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] rank() vs SAS proc rank

2004-03-30 Thread Prof Brian Ripley
On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:

 SAS proc rank has ties options of high and low that would allow
 producing ranks of the type found in the sports pages, e.g.,
 
 rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
 
 Could R support these ties.methods?

Yes, it is possible to program them in R.  Here is one way:

1 + rowSums(outer(x, x, ))

which at least generalizes your single unexplained example.

-- 
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] Tricube weighting procedure

2004-03-30 Thread Joao Pedro W. de Azevedo
Dear R users,
I would like to know if there is (and how I could obtain it) any R
application that performs tricube weighting regressions.
All the best,
JP

__
[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] Data Grouping Question

2004-03-30 Thread Gabor Grothendieck

In rereading this, the solution works but my comments on the names
of APL operators was off.  I think this would make more
sense in terms of naming:  

%all.==% - function(a,b)apply(b,2,function(x)apply(t(a) == x,2,all))
colSums( A %all.==% t(unique(A)) )



Gabor Grothendieck ggrothendieck at myway.com writes:
: 
: Kissell, Robert [EQRE] robert.kissell at citigroup.com writes:
: 
:  I would like to learn how I can group the data on unique rows of A and 
also 
: count the number of times the row
:  occurred. 
: 
: You have already provided the answer, unique(A), to the first part of your
: question.  Here are two solutions to the second part:
: 
: 1. Since each row can be regarded as the representation of a binary
: number:
: 
:  table(A%*%2^(0:3))
: 
: 2. Another possibility not dependent on the binary nature of the
: data is to define:
: 
:  %+.*% - function(a,b)apply(b,2,function(x)apply(t(a) == x,2,all))
: 
: This function is the +.x of APL.  It defines an infix function that does a
: matrix multiply of matrix a and matrix b except it replaces the usual inner
: product of two vectors x and y with all(x==y).
: 
: In terms of this function, the answer is:
: 
:  colSums( A %+.*% t(unique(A)) )

__
[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] a question about scoping functions

2004-03-30 Thread Roger D. Peng
I wrote a function a while back that does something like attaching R 
source files.  The code in the R file is attached in the second position 
on the search list.  I actually don't use it much but you may find it 
useful.

sattach - function(filename) {
if(!is.character(filename))
stop(sQuote(filename),  must be character string)
e - new.env()
eval(parse(filename), envir = e)
func.list - lapply(ls(e), get, envir = e)
names(func.list) - ls(e)
outobj - make.names(basename(filename))
assign(outobj, func.list)
cmd - paste(attach(, outobj, ), sep = )
eval(parse(text = cmd))
}
-roger

Rajarshi Guha wrote:

Hi,
 I've written some helper functions which are used by another function
(called func()). When func() is sourced I dont want the helper function
to be seen in the global namespace (as shown by ls()).
Currently what I have done is:

func - function() {
  helper1 - function() {
...
  }
  helper2 - function() {
...
  }
  # some code
}
Is there anyway to take the functions helper1 and helper2 outside func
(but in the same file) yet keep them from showing up in the global
namespace when the source file for func() is loaded?
A related question is: say I move helper1 and helper2 to a file called
helper.R
When I want to use the helper functions inside func() I can do
source('helper.R') - but that would place them in the global namespace.
Is it possible to source some file within a func() such that the sourced
functions will be local to func()?
Thanks,
---
Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
---
Did you hear that two rabbits escaped from the zoo and so far they have
only recaptured 116 of them?
__
[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] Where: package licenses

2004-03-30 Thread Roger D. Peng
Try

file.show(system.file(DESCRIPTION, package = MASS))

-roger

[EMAIL PROTECTED] wrote:

R:

This stems from my curiosity about the previous thread about  a request 
for glm.nb code.  The issue of package licenses was brought up and I was 
hoping for some clarification on that.  Using the function license() or 
licence() gives info on the license for R, but something like 
license(MASS) does not give info on the license for the MASS package 
(perhaps it might be good to expand the license function in the way 
described).  A quick look on CRAN didn't yield any info on package 
licenses either. 

Thanks.

Jason Higbee
Research Associate
Federal Reserve Bank of St. Louis
	[[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] Tricube weighting procedure

2004-03-30 Thread Liaw, Andy
Could you please explain a bit more what you mean by `tricube weighting
regression'?  The only thing I can think of that might be what you want is
loess/lowess, which uses the tricube kernel for local weighted regression.

Andy

 From: Joao Pedro W. de Azevedo
 Sent: Tuesday, March 30, 2004 6:18 PM
 To: [EMAIL PROTECTED]
 Subject: [R] Tricube weighting procedure
 
 
 Dear R users,
 I would like to know if there is (and how I could obtain it) any R
 application that performs tricube weighting regressions.
 All the best,
 JP
 
 __
 [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
 
 


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

__
[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] BoxPlots, 1 Way ANOVA and Non-Statisticians.

2004-03-30 Thread Adaikalavan Ramasamy
Also check out bplot() function in the library fields.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Chuck Cleland
 Sent: 30 March 2004 20:07
 To: Carlos J. Gil Bellosta
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] BoxPlots, 1 Way ANOVA and Non-Statisticians.


 Carlos:
You could just give the same values for the ylim argument in each
 boxplot

   par(mfrow=c(1,2), las=1)
   boxplot(rnorm(10), rnorm(10), rnorm(10), ylim=c(-3,3))
   boxplot(rnorm(10, 0.5, 1), rnorm(10, -.5, 1), rnorm(10), ylim=c(-3,3))

 Carlos J. Gil Bellosta wrote:
  I am working in a project and I have a number of observations belonging
  to several classes. Using a 1 Way ANOVA, I have rejected the
 equality of
  means hypothesis with a very small p-value. However, the people I have
  to present my results to are not statisticians and they are not very
  likely to be much impressed by a 1.32434e-12 like number/thing.
 
  Therefore I have decided to make to boxplots, one for the actual data
  and the second one for simulated data where the equality of the means
  holds so that the difference in the distributions can be visually
  appreciated.
 
  The problem is that, for the simulated values, being more regular, the
  range of variation is smaller and, therefore, the heigth of the window
  where their boxplot is drawn is also smaller. As a result, the
 scales of
  the two boxplots are not the same and part of the appeal of the visual
  approach is lost in the way.
 
  My question is, is there a way to make two different boxplots within a
  common window? (Or rather, a common size window or, more concretely,
  so that it spans over the same range on the vertical axis).

 --
 Chuck Cleland, Ph.D.
 NDRI, Inc.
 71 West 23rd Street, 8th floor
 New York, NY 10010
 tel: (212) 845-4495 (Tu, Th)
 tel: (732) 452-1424 (M, W, F)
 fax: (917) 438-0894

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

2004-03-30 Thread Bob Cain
Sorry.  Newbie.

__
[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] rank() vs SAS proc rank

2004-03-30 Thread Gabor Grothendieck

This afternoon (EST) there were solutions to two different problems,
which on reflection have a similarity:

Prof Brian Ripley's rank variation:

  1 + rowSums(outer(x, x, ))

and my unique row counts:

  %all.==% - function(a,b)apply(b,2,function(x)apply(t(a) == x,2,all))
  colSums( A %all.==% t(unique(A)) )

It occurred to me that if we define the APL-style
generalized matrix multiply like this:

inner - function(a,b,f,g){ 
f - match.fun(f)
g - match.fun(g)
apply(b,2,function(x)apply(g(t(a),x),2,f))
}

then both problems can be put into a similar form:

   1+inner( t(w), t(w), sum,  )

and

   colSums( inner( A, t(unique(A)), all, == ) )

__
[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] Aggregating frequency of irregular time series

2004-03-30 Thread Gabor Grothendieck


I am not 100% sure I understand what you are trying to accomplish but if
its to calculate the highest date in seriesDates for each value of 
seriesYM then you can do it without a loop like this (untested):

   tapply( seriesDates, seriesYM, max )

Whit Armstrong Whit.Armstrong at tudor.com writes:

: 
: This function will probably work for you if your dates are in the format
: mmdd.  Use it to convert the series from daily to monthly, then use a 1
: period difference to calc the returns of the series.
: 
: Feel free to contact me off list with any questions.
: 
: Dates - function(x) rownames(x)
: 
: Timebase - function(x,monthly=T,first.day=T) {
:   if(length(dim(x))!=2) stop(can only take 2 dimensional data.)
: 
:   seriesDates - as.integer(Dates(x))
:   
:   # year and Month
:   seriesYM - as.integer(seriesDates/100)
:   seriesYM.unique - sort(unique(seriesYM))
:   ans.nrow - length(seriesYM.unique)
: 
:   # loop through all the unique months and grab the max day of month
:   ans - matrix(NA,nrow=ans.nrow,ncol=ncol(x))
:   ans.dates - vector(numeric,ans.nrow)
:   
:   for (i in 1:ans.nrow) {
:   
:   this.month - seriesYM == seriesYM.unique[i]
:   max.day - max(seriesDates[this.month]) 
:   ans.dates[i] - max.day
:   }
: 
:   
:   colnames(ans) - colnames(x)
:   ans[] - x[as.character(ans.dates),]
:   
:   if(first.day==T) {
:   rownames(ans) -
: paste(substring(as.character(ans.dates),1,6),01,sep=)
:   } else {
:   rownames(ans) - ans.dates
:   }
:   
:   as.tseries(ans)
: }
: 
: -Original Message-
: From: r-help-bounces at stat.math.ethz.ch
: [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Patrick Burns
: Sent: Tuesday, March 30, 2004 2:37 PM
: To: Ajay Shah
: Cc: r-help at stat.math.ethz.ch; Ivan Alves
: Subject: Re: [R] Aggregating frequency of irregular time series
: 
: 
: Assuming that you are using log returns, one approach (probably not the
: best) is to convert the dates to julian days, find all of the Sundays
: spanning the dates in the series, then do something along the lines of:
: 
: tapply(the.log.returns, cut(julian.days, sundays), sum)
: 
: Patrick Burns
: 
: Burns Statistics
: patrick at burns-stat.com
: +44 (0)20 8525 0696
: http://www.burns-stat.com
: (home of S Poetry and A Guide for the Unwilling S User)
: 
: Ajay Shah wrote:
: 
: S-Plus has the function AggregateSeries() whose name is self 
: explanatory.  For instance one can derive monthly series from daily 
: ones by specifying end-of-period, averages, sums, etc.  I looked for a 
: similar function in the packages its and tseries, but found 
: nothing.  I also help.searched() for aggregate to no avail.  Would 
: anybody be so kind to point me in the right direction?
: 
: 
: 
: I once needed a function which would convert daily stock prices into 
: weekly returns. I know, the code is pretty bad (it is all loops and 
: it's very slow), but my knowledge of R is weak and I really needed it, 
: so I just used brute force. See EOF for the function. Gabor and Dirk 
: and Brian Ripley and others on the list were very helpful to me in 
: getting to the point where I could write this, though obviously they 
: should not be blamed for my bad code! 
: 
: I would be very happy if listers could give me ideas on how to do this 
: better.
: 
: Daily to monthly is innately easier since months are 'more normal' than 
: weeks. I have perl code which does this, which supports 2 cases: 
: Reporting the last traded price (LTP) of the month versus reporting the 
: average of the month. If this is useful to you, ask me.
: 
: What are the specialised finance libraries available with S-Plus? Can 
: one marry R with commercial S libraries? I don't like having a 
: dependence on commercial code, but I might be willing to compromise and 
: buy libraries that work with R.
: 
: Thanks,
: 
:   
: 
: 
: __
: R-help at stat.math.ethz.ch 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-help at stat.math.ethz.ch 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] White standard errors for lme?

2004-03-30 Thread Owen Wu
How can I compute Huber/White standard errors for mixed-effects models?

The function robcov in the design library can only provide Huber/White standard 
errors for models that have a residuals(fit,type=score) function implemented, such as 
lrm, cph , coxph, and ordinary linear models (ols).  But I hope to do the same for lme 
(linear mixed-effects models).

Thanks in advance

__
[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] Failure to compile source packages in Debian

2004-03-30 Thread F. Tusell
As of quite recently I experience failures to compile source packages. 
Messages like

 * Installing *source* package 'dse1' ...
** libs
g77 -mieee-fp  -fPIC  -g -O2 -c dsefor.f -o dsefor.o
gcc -shared  -o dse1.so dsefor.o  -L/usr/lib/gcc-lib/i486-linux/3.3.3 
-L/usr/lib/gcc-lib/i486-linux/3.3.3/../../..
-lfrtbegin -lg2c-pic -lm -lgcc_s -L/usr/lib/R/bin -lR
/usr/bin/ld: no se puede encontrar -lg2c-pic

clearly point to the non-existence of library g2c-pic. Problem is I 
cannot locate  the .deb package
containing such library. Could some Debian user point me to the right 
location? (I am using
Debian testing  on a Pentium box and R ver. 1.8.1 installed from the 
.deb package.)

Thank you.

--
Fernando TUSELLe-mail:
Departamento de Econometría y Estadística   [EMAIL PROTECTED] 
Facultad de CC.EE. y Empresariales Tel:   (+34)94.601.3733
Avenida Lendakari Aguirre, 83  Fax:   (+34)94.601.3754
E-48015 BILBAO  (Spain)Secr:  (+34)94.601.3740

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