Re: [R] Mandrake 10.1

2005-03-14 Thread miguel manese
IIRC I also installed that rpm months ago. I got a problem about
failed depndency on libf2c something, which was satisfied by this
package (search & download it somewhere, or mail me personally so I
can send it to you) libf2c0-3.4.1-4mdk.i586.rpm

jon


On Mon, 14 Mar 2005 19:21:05 +0100, Christian <[EMAIL PROTECTED]> wrote:
> Dear all,
> 
> I am trying to install the R-2.0.0-1mdk.i586.rpm
> 
> file   on mandrake 10.1. Since the file is, originally, meant for
> Mandrake 10.0, it is not surprising me that the installation does not work.
> 
> The error message that I get can be translated in something like:
> "impossible to install since the info is not satisfied".
> Could you please help me in installing R on my Mandrake 10.1?
> 
> PS If you feel to answer me,  consider that I am almost an absolute
> beginner at linux:)
> 
> Thanks a lot
> 
> Christian
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help 
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 
>

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


Re: [R] bayesmix - What is or where can I find JAGS executable?

2005-03-14 Thread Uwe Ligges
Karl Knoblick wrote:
Sorry about the further question:
I downloaded bayesmix_0.5-3.zip (see below) - but
there is no jags.exe (even no *.exe) included.
Adress:
http://www.ci.tuwien.ac.at/~gruen/BayesMix/
Downloaded:
"Windows binaries including JAGS executable:
bayesmix_0.5-3.zip"

I asked you in a former mail to ask Martyn for his new page location. 
Also, you could ask Martina Gruen to fix the issue with either bayesmix 
or her page cited above (including the link to JAGS). I don't see any 
reason this message was sent to R-help.

Uwe Ligges

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


Re: [R] Install the RMySQL

2005-03-14 Thread Prof Brian Ripley
On Mon, 14 Mar 2005, Ko,Younhee wrote:
Hi, I have some problem to install RMySQL package.
Could you help me?
Please tell us your OS, R version, etc.
I set up the path.
You set a couple of variables, but no path.  (These at most supplement the 
include and library paths.)

[EMAIL PROTECTED] library]# export PKG_CPPFLAGS="-I/var/lib/mysql"
[EMAIL PROTECTED] library]# export PKG_LIBS="-L/var/lib/mysql -
lmysqlclient"
Looks like your MySQL files are not where you claim they: I would not 
expect them to be there (headers are not normally in a 'lib' directory), 
but where they are depends on whether this is an installation from the 
sources (not likely if it uses /var/lib), RPM etc.  E.g. FC3 has

checking for mysql_init in -lmysqlclient... yes
 mysqlclient found in -L/usr/lib/mysql
checking for /usr/local/include/mysql/mysql.h... no
checking for /usr/include/mysql/mysql.h... yes
Note to David James as maintainer: should not finding these be an error, 
or at least give a very loud warning from configure?


[EMAIL PROTECTED] library]# R CMD INSTALL /home/younko/RMySQL_0.5-
5.tar.gz
I got this bunch of error message.

Please help me.
* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -I/usr/local/lib/R/include -I/var/lib/mysql -
I/usr/local/include   -fPIC  -g -O2 -c RS-DBI.c -o RS-DBI.o
gcc -I/usr/local/lib/R/include -I/var/lib/mysql -
I/usr/local/include   -fPIC  -g -O2 -c RS-MySQL.c -o RS-
MySQL.o
In file included from RS-MySQL.c:22:
RS-MySQL.h:40:19: mysql.h: No such file or directory
RS-MySQL.h:41:27: mysql_version.h: No such file or directory
RS-MySQL.h:42:23: mysql_com.h: No such file or directory
That's sufficient info.
--
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
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] cv.glm {boot}

2005-03-14 Thread Prof Brian Ripley
On Mon, 14 Mar 2005, Trevor Wiens wrote:
I am try to cross validate some logistic regressions. cv.glm allows me 
to do this randomly but since I have data over a number of years and 
over a number of distince areas, I would like to cross-validate 
temporarly and spatially. I've already attached the temporal and spatial 
attributes to my data, but I'm unsure as to how to achieve this, as it 
seems I can't use cv.glm for this purpose.
Cross-validation assumes exchangeability of units.  You can easily write 
your own code (lots of examples in MASS), but first you would need to 
prove the validity of what you are attempting.  For example, dropping 
chunks in the middle of a time series is not valid unless your prediction 
somehow takes the temporal structure into account (and glm does not).

--
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
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] cv.glm {boot}

2005-03-14 Thread Trevor Wiens
I am try to cross validate some logistic regressions. cv.glm allows me to do 
this randomly but since I have data over a number of years and over a number of 
distince areas, I would like to cross-validate temporarly and spatially. I've 
already attached the temporal and spatial attributes to my data, but I'm unsure 
as to how to achieve this, as it seems I can't use cv.glm for this purpose.

Thanks in advance.

T
-- 
Trevor Wiens 
[EMAIL PROTECTED]

The significant problems that we face cannot be solved at the same 
level of thinking we were at when we created them. 
(Albert Einstein)

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


[R] trellis/ panel.superpose/ passing in superscripts/ groups

2005-03-14 Thread McClatchie, Sam (PIRSA-SARDI)
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
-

Colleagues

I'm plotting fish egg densities in temperature-salinity space (i.e. mean
temperature ~ mean salinity | fish egg densities) for two survey years.  The
bivariate plot is overlaid on a temperature ~ salinity plot (not means)
showing the distribution of water masses, so I can see the association of
the eggs with water masses.

It is all working, but I have had to replace a call to panel.superpose with
panel.xyplot to plot the two years with different symbols. The problem may
be related to one raised by Volker Franz
 that was
reported to be fixed. On the other hand, I may just be using panel.superpose
incorrectly. You can see that I've messed around with the groups variable to
try and get it working.

My code is as follows.

"sardine.egg.T.S.space.2001.and.2002.exp" <-
  function()
  {
library(lattice)
# trellis.device(postscript,
#
file="../figures/sardine.egg.T.S.space.2001.and.2002.ps",
#horizontal=FALSE,
color=TRUE)

year <- as.factor(rep(2001,  dim(mn.ts.e.2001)[1]))
year.2001 <- cbind(mn.ts.e.2001,year)
year <- as.factor(rep(2002,  dim(mn.ts.e.2002)[1]))
year.2002 <- cbind(mn.ts.e.2002,year)
mn.ts.e.both <- rbind(year.2001, year.2002)
#browser()
###trellis plot
##int <- matrix(c(0,5,6,10,11,20,21,40,41,80,81,160), ncol=2,
byrow=TRUE)
int <- matrix(c(0,2,3,4,5,8,9,16,17,32,33,64), ncol=2, byrow=TRUE)
egg.counts <- shingle(mn.ts.e.both$eggs2.Pilch.Eggs, intervals = int)
larvae.counts <- shingle(mn.ts.e.both$eggs2.Pilch.Larv, intervals = int)

out1 <- xyplot(mn.t ~  mn.s |  egg.counts,
   data = mn.ts.e.both,
#groups = year,
   xlim = c(35,38), ylim = c(12,24),
   xlab = "mean salinity", ylab = "mean temperature (deg.
C)",
   main = "2001 and 2002 egg densities in
Temperature-Salinity space",
   aspect = "xy",
   jitter = T,
   layout = c(1,6),
   auto.key=TRUE,
   panel = function(x, y, subscripts = c(2,3)){
 panel.xyplot(data.2001$Salinity,
data.2001$Temperature.oC, 
  pch=".", col="yellow")
 panel.xyplot(data.2002$Salinity,
data.2002$Temperature.oC, 
  pch=".", col="orange")
 panel.text(37.8, 15, "Upwelling")
 panel.text(37.8, 17.5, "Warm pool")
 panel.text(37.8, 19.75, "Shelf break")
 panel.text(37.8, 21.5, "Spencer Gulf")
 panel.abline(h = c(16,19,20.5), v = 36.5, col="red",
lty=2)
  

 ##  panel.superpose(x,y,
 ##  subscripts=c(2,3),
 ##  groups = mn.ts.e.both$year,
 ##  cex=0.5)
 ##auto.key = T
 panel.xyplot(year.2001$mn.s,  year.2001$mn.t,
  col="cyan")
 panel.xyplot(year.2002$mn.s,  year.2002$mn.t,
  col="purple")
 
   }
   )

print(out1)
#   graphics.off()

  }


Any suggestions regarding how to get panel.superpose working would be
gratefully received. Sorry I cannot provide the data so the code is easily
used. Data are a bit large to paste into an email.

Sam

Sam McClatchie,
Biological oceanography 
South Australian Aquatic Sciences Centre
PO Box 120, Henley Beach 5022
Adelaide, South Australia
email <[EMAIL PROTECTED]>
Telephone: (61-8) 8207 5448
FAX: (61-8) 8200 2481
Research home page 
  
   /\
  ...>> 
 
   <°)Xx><<
  /  \\
><(((°> 
  >><(((°>   ...>>O<°)Xx><<

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


Re: [R] Legend Line Size

2005-03-14 Thread Marc Schwartz
On Mon, 2005-03-14 at 15:55 -0500, McGehee, Robert wrote:
> Hello all,
> 
> When I view or print the below plot on my Linux machine under R 2.0.1 I
> see a nice thick solid and dashed line with a legend. However, while the
> lines are distinguishable, the legend is not. That is, the short (solid)
> line next to "line1" and the short (dashed) line next to "line2" seem to
> have the exact same length. What I would like to do is to expand the
> legend line a bit farther so that the user can clearly see a solid vs. a
> dashed line and not too small lines that look the same.
> 
> A glance at the legend source code shows that the line segment length
> (seg.len) seems to be hard-coded as 2. If I change this to a larger
> number within the code, I get the effect that I want (although the box
> around the legend needs to be resized). Am I overlooking a more obvious
> way to distinguish the legend lines, or would it make more sense to
> patch the legend function to fit my needs?
> 
> x <- 1:10
> plot(x, x, type = "l", lty = 1, lwd = 4)
> lines(x, 2*x, type = "l", lty = 5, lwd = 4)
> legend(7, 5, legend = c("line1", "line2"), lty = c(1, 5), lwd = 4)

Robert,

I think that this is exhibiting an interaction between the line type and
the line width. 

I have not looked at the low level segments code to see what is going
on, but if you try 'lwd = 2' in the call to legend, the dashed line
shows up fine. If I try a line width of 3, it seems that this is the
point where there is the loss of the dashed line type.

There is a difference in the appearance of the line even with a lwd
setting of 1 versus 2.

I temporarily put up a PDF file at:

http://www.MedAnalytics.com/Rplots.pdf

The lwd setting in each plot is:

1, 2
3, 4

You can see the progression of the loss of the dashed line type in the
lower two plots. It appears as if the length of the first dash increases
as the line width increases, rather than just the line width increasing
independently. So there is a progressive loss of the second dash.
resulting in a single solid line.

Not sure if that helps, but if you can stay with 'lwd = 1' for your
plot, that should solve the problem.

HTH,

Marc Schwartz

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


[R] Mandrake 10.1

2005-03-14 Thread Christian
Dear all,
I am trying to install the R-2.0.0-1mdk.i586.rpm 
 
file   on mandrake 10.1. Since the file is, originally, meant for 
Mandrake 10.0, it is not surprising me that the installation does not work.

The error message that I get can be translated in something like: 
"impossible to install since the info is not satisfied".
Could you please help me in installing R on my Mandrake 10.1?

PS If you feel to answer me,  consider that I am almost an absolute 
beginner at linux:)

Thanks a lot
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Output a dataframe from R to excel

2005-03-14 Thread Tomas Aragon

--- Faith G <[EMAIL PROTECTED]> wrote:
> Hi, 
> I am trying to output an dataframe from R to Excel file. Can anyone
> tell me how to do it? Thanks a lot.
> Eg. 
> R dataframe:
> ABC
> 121
> 342
> ...
> 

Try:
write.table(mydf, "c:/mydf.csv", sep=",", row.names=FALSE)

Then open 'mydf.csv' in Excel.

Tomas
http://www.epitools.net

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


[R] CDISC tools for R?

2005-03-14 Thread A.J. Rossini
Has anyone hacked up tools for reading/writing CDISC applications
(ADaM, SEND,  SDTM, ODM) files or using/verifying vocabulary with R? 
(i.e. via the XML, ontoTools, and similar packages)?

(I'd be interested in hearing privately from any consultants/vendors
who have been working on this as well; S-PLUS would be a
related/relevant target).

best,
-tony

"Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes" (AJR, 4Jan05).

A.J. Rossini
[EMAIL PROTECTED]

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


Re: [R] calling objects in a foreloop

2005-03-14 Thread Thomas Lumley
On Mon, 14 Mar 2005, Benjamin M. Osborne wrote:
I want to organize outputs from several regressions into a handy table.  When I
try the following, each of my "fit_s" is replaces instead of read.  Is there a
way to read from the regression summaries that does not require writing
separate lines of code for each?

Put the lm objects into a list rather than into separate variables, then 
you can loop or lapply() over the list.

fits<-vector("list",8)
fits[[1]]<-lm(dBA.spp16$sp2.dBA.ha~dBA.spp16$sp1.dBA.ha)
fits[[2]]<-lm(dBA.spp16$sp3.dBA.ha~dBA.spp16$sp1.dBA.ha)
etc
dBA.spp16.fits<-matrix(NA, nrow=8, ncol=5)
for (i in 1:8){
summ<-summary(fit[[i]])
dBA.spp16.fits[i,2]<-summ$coef[1,1]
dBA.spp16.fits[i,3]<-summ$coef[2,1]
dBA.spp16.fits[i,4]<-summ$r.squared
dBA.spp16.fits[i,5]<-summ$adj.r.squared
}
Other things to note
1/  You can't put the formula into a numeric matrix
2/ lm(dBA.spp16$sp2.dBA.ha~dBA.spp16$sp1.dBA.ha) can be more elegantly 
written as
   lm(sp2.dBA.ha~sp1.DB.ha, data=dBA.spp16)

When you find yourself doing computations on the names of objects rather 
than on their values it is usually a bad sign.

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


[R] Install the RMySQL

2005-03-14 Thread Ko,Younhee
Hi, I have some problem to install RMySQL package.
Could you help me?

I set up the path.


[EMAIL PROTECTED] library]# export PKG_CPPFLAGS="-I/var/lib/mysql"
[EMAIL PROTECTED] library]# export PKG_LIBS="-L/var/lib/mysql -
lmysqlclient"
[EMAIL PROTECTED] library]# R CMD INSTALL /home/younko/RMySQL_0.5-
5.tar.gz 


I got this bunch of error message.



Please help me.


* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -I/usr/local/lib/R/include -I/var/lib/mysql -
I/usr/local/include   -fPIC  -g -O2 -c RS-DBI.c -o RS-DBI.o
gcc -I/usr/local/lib/R/include -I/var/lib/mysql -
I/usr/local/include   -fPIC  -g -O2 -c RS-MySQL.c -o RS-
MySQL.o
In file included from RS-MySQL.c:22:
RS-MySQL.h:40:19: mysql.h: No such file or directory
RS-MySQL.h:41:27: mysql_version.h: No such file or directory
RS-MySQL.h:42:23: mysql_com.h: No such file or directory
In file included from RS-MySQL.c:22:
RS-MySQL.h:109: `FIELD_TYPE_DECIMAL' undeclared here (not in 
a function)
RS-MySQL.h:109: initializer element is not constant
RS-MySQL.h:109: (near initialization for `RS_MySQL_dataTypes
[0].typeId')
RS-MySQL.h:109: initializer element is not constant
RS-MySQL.h:109: (near initialization for `RS_MySQL_dataTypes
[0]')
RS-MySQL.h:110: `FIELD_TYPE_TINY' undeclared here (not in a 
function)
RS-MySQL.h:110: initializer element is not constant
RS-MySQL.h:110: (near initialization for `RS_MySQL_dataTypes
[1].typeId')
RS-MySQL.h:110: initializer element is not constant
RS-MySQL.h:110: (near initialization for `RS_MySQL_dataTypes
[1]')
RS-MySQL.h:111: `FIELD_TYPE_SHORT' undeclared here (not in a 
function)
RS-MySQL.h:111: initializer element is not constant
RS-MySQL.h:111: (near initialization for `RS_MySQL_dataTypes
[2].typeId')
RS-MySQL.h:111: initializer element is not constant
RS-MySQL.h:111: (near initialization for `RS_MySQL_dataTypes
[2]')
RS-MySQL.h:112: `FIELD_TYPE_LONG' undeclared here (not in a 
function)
RS-MySQL.h:112: initializer element is not constant
RS-MySQL.h:112: (near initialization for `RS_MySQL_dataTypes
[3].typeId')
RS-MySQL.h:112: initializer element is not constant
RS-MySQL.h:112: (near initialization for `RS_MySQL_dataTypes
[3]')
RS-MySQL.h:113: `FIELD_TYPE_FLOAT' undeclared here (not in a 
function)
RS-MySQL.h:113: initializer element is not constant
RS-MySQL.h:113: (near initialization for `RS_MySQL_dataTypes
[4].typeId')
RS-MySQL.h:113: initializer element is not constant
RS-MySQL.h:113: (near initialization for `RS_MySQL_dataTypes
[4]')
RS-MySQL.h:114: `FIELD_TYPE_DOUBLE' undeclared here (not in 
a function)
RS-MySQL.h:114: initializer element is not constant
RS-MySQL.h:114: (near initialization for `RS_MySQL_dataTypes
[5].typeId')
RS-MySQL.h:114: initializer element is not constant
RS-MySQL.h:114: (near initialization for `RS_MySQL_dataTypes
[5]')
RS-MySQL.h:115: `FIELD_TYPE_NULL' undeclared here (not in a 
function)
RS-MySQL.h:115: initializer element is not constant
RS-MySQL.h:115: (near initialization for `RS_MySQL_dataTypes
[6].typeId')
RS-MySQL.h:115: initializer element is not constant
RS-MySQL.h:115: (near initialization for `RS_MySQL_dataTypes
[6]')
RS-MySQL.h:116: `FIELD_TYPE_TIMESTAMP' undeclared here (not 
in a function)
RS-MySQL.h:116: initializer element is not constant
RS-MySQL.h:116: (near initialization for `RS_MySQL_dataTypes
[7].typeId')
RS-MySQL.h:116: initializer element is not constant
RS-MySQL.h:116: (near initialization for `RS_MySQL_dataTypes
[7]')
RS-MySQL.h:117: `FIELD_TYPE_LONGLONG' undeclared here (not 
in a function)
RS-MySQL.h:117: initializer element is not constant
RS-MySQL.h:117: (near initialization for `RS_MySQL_dataTypes
[8].typeId')
RS-MySQL.h:117: initializer element is not constant
RS-MySQL.h:117: (near initialization for `RS_MySQL_dataTypes
[8]')
RS-MySQL.h:118: `FIELD_TYPE_INT24' undeclared here (not in a 
function)
RS-MySQL.h:118: initializer element is not constant
RS-MySQL.h:118: (near initialization for `RS_MySQL_dataTypes
[9].typeId')
RS-MySQL.h:118: initializer element is not constant
RS-MySQL.h:118: (near initialization for `RS_MySQL_dataTypes
[9]')
RS-MySQL.h:119: `FIELD_TYPE_DATE' undeclared here (not in a 
function)
RS-MySQL.h:119: initializer element is not constant
RS-MySQL.h:119: (near initialization for `RS_MySQL_dataTypes
[10].typeId')
RS-MySQL.h:119: initializer element is not constant
RS-MySQL.h:119: (near initialization for `RS_MySQL_dataTypes
[10]')
RS-MySQL.h:120: `FIELD_TYPE_TIME' undeclared here (not in a 
function)
RS-MySQL.h:120: initializer element is not constant
RS-MySQL.h:120: (near initialization for `RS_MySQL_dataTypes
[11].typeId')
RS-MySQL.h:120: initializer element is not constant
RS-MySQL.h:120: (near initialization for `RS_MySQL_dataTy

[R] calling objects in a foreloop

2005-03-14 Thread Benjamin M. Osborne
I want to organize outputs from several regressions into a handy table.  When I
try the following, each of my "fit_s" is replaces instead of read.  Is there a
way to read from the regression summaries that does not require writing
separate lines of code for each?
-Ben Osborne

> fit1<-lm(dBA.spp16$sp2.dBA.ha~dBA.spp16$sp1.dBA.ha)
> fit2<-lm(dBA.spp16$sp3.dBA.ha~dBA.spp16$sp1.dBA.ha)
> fit3<-lm(dBA.spp16$sp3.dBA.ha~dBA.spp16$sp2.dBA.ha)
> fit4<-lm(dBA.spp16$sp5.dBA.ha~dBA.spp16$sp4.dBA.ha)
> fit5<-lm(dBA.spp16$sp6.dBA.ha~dBA.spp16$sp4.dBA.ha)
> fit6<-lm(dBA.spp16$sp5.dBA.ha~dBA.spp16$sp6.dBA.ha)
> fit7<-lm(dBA.spp16$sp1.dBA.ha~dBA.spp16$sp4.dBA.ha)
> fit8<-lm(dBA.spp16$sp1.dBA.ha~dBA.spp16$sp5.dBA.ha)
>
> dBA.spp16.fits<-matrix(NA, nrow=8, ncol=5)
> colnames(dBA.spp16.fits)<-c("formula","intercept","slope","R^2","adj.R^2")
>
> for (i in 1:8){
+ dBA.spp16.fits[i,1]<-summary(as.name(paste("fit",i,sep="")))$call
+ dBA.spp16.fits[i,2]<-summary(as.name(paste("fit",i,sep="")))$coef[1,1]
+ dBA.spp16.fits[i,3]<-summary(as.name(paste("fit",i,sep="")))$coef[2,1]
+ dBA.spp16.fits[i,4]<-summary(as.name(paste("fit",i,sep="")))$r.squared
+ dBA.spp16.fits[i,5]<-summary(as.name(paste("fit",i,sep="")))$adj.r.squared
+ }
Error in "[<-"(`*tmp*`, i, 1, value = NULL) :
number of items to replace is not a multiple of replacement length

# Because:
> i<-1
> summary(as.name(paste("fit",i,sep="")))
Length  Class   Mode
 1   name   name
>
-- 
Botany Department
University of Vermont
109 Carrigan Drive
Burlington, VT 05405

[EMAIL PROTECTED]
phone: 802-656-0297
fax: 802-656-0440

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


[R] Legend Line Size

2005-03-14 Thread McGehee, Robert
Hello all,

When I view or print the below plot on my Linux machine under R 2.0.1 I
see a nice thick solid and dashed line with a legend. However, while the
lines are distinguishable, the legend is not. That is, the short (solid)
line next to "line1" and the short (dashed) line next to "line2" seem to
have the exact same length. What I would like to do is to expand the
legend line a bit farther so that the user can clearly see a solid vs. a
dashed line and not too small lines that look the same.

A glance at the legend source code shows that the line segment length
(seg.len) seems to be hard-coded as 2. If I change this to a larger
number within the code, I get the effect that I want (although the box
around the legend needs to be resized). Am I overlooking a more obvious
way to distinguish the legend lines, or would it make more sense to
patch the legend function to fit my needs?

x <- 1:10
plot(x, x, type = "l", lty = 1, lwd = 4)
lines(x, 2*x, type = "l", lty = 5, lwd = 4)
legend(7, 5, legend = c("line1", "line2"), lty = c(1, 5), lwd = 4)

Thanks,
Robert

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


Re: [R] difficulties with the save.image() function

2005-03-14 Thread Don MacQueen
At 3:44 PM +0100 3/12/05, Uwe Ligges wrote:
Tracy Bergemann wrote:
Dear list,
I've had difficulty saving my workspace to an .RData file.
This causes considerable frustration as it means that I have to regenerate
my analysis every time I want to update it.  For microarray data in
particular, this can be quite time consuming.
I'm saving my data to a network folder on my system in Windows XP, something
like an "H:\" drive or a "P:\" drive instead of a "C:\" drive.
Here is the command which saves my workspace to my working directory:
save.image("H:/Consulting/cmlExprA.RData")
And here is the error I get:
Error in save(list = ls(envir = .GlobalEnv, all.names = TRUE), file =
outfile,: error writing to connection
Any assistance?
To which we might add a simple test such as:
   sink('H:/Consulting/test.txt') ; ls() ; sink()
Which if it succeeds will eliminate some possible issues, and if it 
fails will eliminate others.

- Do you have write access?
- Is there enough space available?
- Any quota?
- Can you save on a local drive, say a temp directory?
- How big is the file size? ("microarray" make me assume it is huge, 
so is it > 2GB?, does the system support the file size?)

- What is the output of
 file.info("H:/Consulting/cmlExprA.RData")
and
 file.info("H:/Consulting")
Uwe Ligges

Many thanks,
Tracy L. Bergemann, PhD
Biostatistics Core
University of Minnesota Cancer Center
B412-4 Mayo building
Office # 626-5408
-Don
--
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Output a dataframe from R to excel

2005-03-14 Thread Roger Bivand
On Sun, 13 Mar 2005, Faith G wrote:

> Hi, 
> I am trying to output an dataframe from R to Excel file. Can anyone tell me 
> how to do it? Thanks a lot.
> Eg. 
> R dataframe:
> ABC
> 121
> 342
> ...

?write.table (see also the nice example)

> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

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

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


Re: [R] Output a dataframe from R to excel

2005-03-14 Thread Jeff Gentry
> I am trying to output an dataframe from R to Excel file. Can anyone
> tell me how to do it? Thanks a lot. 

write.csv() might get you where you want to go.

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


Re: [R] bayesmix - What is or where can I find JAGS executable?

2005-03-14 Thread Karl Knoblick
Sorry about the further question:

I downloaded bayesmix_0.5-3.zip (see below) - but
there is no jags.exe (even no *.exe) included.

Adress:
http://www.ci.tuwien.ac.at/~gruen/BayesMix/
Downloaded:
"Windows binaries including JAGS executable:
bayesmix_0.5-3.zip"

Karl

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


[R] Output a dataframe from R to excel

2005-03-14 Thread Faith G
Hi, 
I am trying to output an dataframe from R to Excel file. Can anyone tell me how 
to do it? Thanks a lot.
Eg. 
R dataframe:
ABC
121
342
...

[[alternative HTML version deleted]]

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


Re: [R] bayesmix - What is or where can I find JAGS executable?

2005-03-14 Thread Karl Knoblick
Googling shows an pdf - but this link is broken.

Karl


--- Uwe Ligges <[EMAIL PROTECTED]>
wrote:
> Karl Knoblick wrote:
> 
> > Hallo!
> > 
> > I want to use the package bayesmix. Trying the
> > examples I had no success. The reason is, I think:
> 
> > 
> >>haveJAGS()
> > 
> > [1] FALSE
> > 
> > Have read of JAGS executable (I could not find
> > JAGS.exe in my R directory). What is JAGS? Where
> can I
> > find or download it?
> 
> What about googling for "JAGS.exe"?
> 
> Uwe Ligges
> 
> 
> 
> > Karl
> > 
> > __
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
> 
>

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


Re: [R] The corresponding Fortran77 codes for R function pt()

2005-03-14 Thread Duncan Murdoch
On Mon, 14 Mar 2005 11:57:39 -0600, tianyue <[EMAIL PROTECTED]> wrote :

>Hi,
>
>I'm trying to find the corresponding Fortran77 subroutines for R 
>function pt(). I tried some Fortran77 subroutines to compute the t 
>distribution function. But none of them are as good as R function pt(). 
>Does anyone can give me some information about it?

Others have pointed you to the source code for that function.  You may
also want to call it directly:  R exports some functions with C
interfaces (that should be callable from Fortran, too).  See the R API
chapter in the Writing R Extensions manual.

Duncan Murdoch

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


Re: [R] Bug on MWC1019?

2005-03-14 Thread Duncan Murdoch
On Mon, 14 Mar 2005 16:54:46 +0100, "Guido Montorsi"
<[EMAIL PROTECTED]> wrote :

>Dear R-developer (Marsaglia??)
>
>The following  piece of code from package SuppDist , routine "dist.cc" seems
>to have a bug

You should normally send package bug reports to the maintainer, in
this case Bob Wheeler (who I've cc'd).

By the way, I agree that code does look wrong, but it would also be
helpful to provide R code that gives obviously wrong answers because
of it.

Duncan Murdoch

>
>ULONG MWC1019(void){
>   ULONG long t;
>   int i = endQ-1;
>
>   t = 147669672LL*Q[i] + Q[endQ];
>   Q[endQ] = (t>>32);
>   if(i>0)
>   return(Q[i--] = t);
>   i = endQ-1;
>   return(Q[0] = t);
>}
>
>in fact , being "i" a local variable that have automatic storage, it is
>initialized to endQ-1 (1019)
> each time the routine is called so that it can never
>cycle through all values as it should.
>
>I think it should be declared as static:
>
>ULONG MWC1019(void){
>   ULONG long t;
>   static int  i = endQ-1;
>
>   t = 147669672LL*Q[i] + Q[endQ];
>   Q[endQ] = (t>>32);
>   if(i>0)
>   return(Q[i--] = t);
>   i = endQ-1;
>   return(Q[0] = t);
>}
>
>Best regards,
>
>Guido Montorsi
>
>__
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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


Re: [R] Bug on MWC1019?

2005-03-14 Thread Uwe Ligges
Guido Montorsi wrote:
Dear R-developer (Marsaglia??)
The following  piece of code from package SuppDist , routine "dist.cc" seems
to have a bug
The package is called *SuppDists*.
Bug reports and contributions for contributed packages should be 
addressed to the package maintainer (CCing, he might not be listening) 
rather than to R-help. Thanks.

Uwe Ligges

ULONG MWC1019(void){
ULONG long t;
int i = endQ-1;
t = 147669672LL*Q[i] + Q[endQ];
Q[endQ] = (t>>32);
if(i>0)
return(Q[i--] = t);
i = endQ-1;
return(Q[0] = t);
}
in fact , being "i" a local variable that have automatic storage, it is
initialized to endQ-1 (1019)
 each time the routine is called so that it can never
cycle through all values as it should.
I think it should be declared as static:
ULONG MWC1019(void){
ULONG long t;
static int  i = endQ-1;
t = 147669672LL*Q[i] + Q[endQ];
Q[endQ] = (t>>32);
if(i>0)
return(Q[i--] = t);
i = endQ-1;
return(Q[0] = t);
}
Best regards,
Guido Montorsi
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] The corresponding Fortran77 codes for R function pt()

2005-03-14 Thread Uwe Ligges
tianyue wrote:
Hi,
I'm trying to find the corresponding Fortran77 subroutines for R 
function pt(). I tried some Fortran77 subroutines to compute the t 
distribution function. But none of them are as good as R function pt(). 
Does anyone can give me some information about it?
Well, you can download the sources and take a look...
Who told you that it is in Fortran?
Uwe Ligges

Thank you very much!
Tianyue
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] par(new=TRUE) vs par(new=FALSE)

2005-03-14 Thread Peter Dalgaard
Dirk Enzmann <[EMAIL PROTECTED]> writes:

> Just out of curiosity (and I hope that my question does not confuse
> those who intuitively understood the par(new=TRUE) statement right in
> the beginning):
> 
> I would like to know whether beginners (learning R) had the same
> difficulty as I had: Intuitively I thought that par(new=TRUE) would
> draw a new plot (and not into an already existing plot) and that
> par(new=FALSE) would not draw a new plot but draw into an already
> existing plot - opposed to what the par(new=TRUE) statement actually
> does. (It would be interesting to receive an answer also from those
> who meanwhile reached an expert status  in working with the R syntax).
> Perhaps my confusion is due to the fact that I am a trained
> right-handed that really is a left-handed (those people tend to
> mistake contrasts).
> 
> If there are a lot of people having this difficulty, I would like to
> know why the decision was made to define the mode of action of the
> par(new=TRUE) statement as it is now. Perhaps that helps me to
> understand better the way programmers tend to think.

Well, internal consistency tends to get higher priority than people's
intuition. 

We already had par("new") which reflects a variable that gets set TRUE
when a new page is created, and set FALSE when a page is "dirtied".

This controls whether things like plot() needs to "eject the paper"
and start a new plot area, or whether it can just draw into the
existing area. To write on top of an existing plot it is occasionally
useful to pretend that the plot is new so you set the variable
accordingly.

Now, we could of course have set up the logic so that par("new") was
TRUE whenever you were *not* at the beginning of a new plot. Or we
could have arranged so that par("new"=FALSE) would set par("new) to be
TRUE, but neither struck us a particularly good idea

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

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


Re: [R] The corresponding Fortran77 codes for R function pt()

2005-03-14 Thread Thomas Lumley
On Mon, 14 Mar 2005, tianyue wrote:
Hi,
I'm trying to find the corresponding Fortran77 subroutines for R function 
pt(). I tried some Fortran77 subroutines to compute the t distribution 
function. But none of them are as good as R function pt(). Does anyone can 
give me some information about it?

There is no Fortran subroutine (although some of the C functions are 
translations of Fortran).  The C code is in any R source distribution, in 
src/nmath/pt.c.  It also calls src/nmath/pbeta.c. The comments in the 
code say where the algorithms came from.

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


Re: [R] par(new=TRUE) vs par(new=FALSE)

2005-03-14 Thread Uwe Ligges
Dirk Enzmann wrote:
Just out of curiosity (and I hope that my question does not confuse 
those who intuitively understood the par(new=TRUE) statement right in 
the beginning):

I would like to know whether beginners (learning R) had the same 
difficulty as I had: Intuitively I thought that par(new=TRUE) would draw 
a new plot (and not into an already existing plot) and that 
par(new=FALSE) would not draw a new plot but draw into an already 
existing plot - opposed to what the par(new=TRUE) statement actually 
does. (It would be interesting to receive an answer also from those who 
meanwhile reached an expert status  in working with the R syntax). 
Perhaps my confusion is due to the fact that I am a trained right-handed 
that really is a left-handed (those people tend to mistake contrasts).

If there are a lot of people having this difficulty, I would like to 
know why the decision was made to define the mode of action of the 
par(new=TRUE) statement as it is now. Perhaps that helps me to 
understand better the way programmers tend to think.

This has been defined ages ago in the blue book (maybe in the brown one, 
I don't have it handy), so no chance to redefine. It confuses several 
users, but ?par has the nice explaination:

'new: logical, defaulting to FALSE. If set to TRUE, the next high-level 
plotting command (actually plot.new) should not clean the frame before 
drawing “as if it was on a new device”.'

Uwe Ligges

*
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Schlueterstr. 28
D-20146 Hamburg
Germany
phone: +49-040-42838.7498 (office)
   +49-040-42838.4591 (Billon)
fax:   +49-040-42838.2344
email: [EMAIL PROTECTED]
www: 
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html 

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


RE: [R] The corresponding Fortran77 codes for R function pt()

2005-03-14 Thread Huntsinger, Reid
The routine "pt" is in the numerical mathematics library, in src/nmath if
you untar the source distribution of R. It's in C, though, not Fortran. You
can write Fortran wrappers for it.

Reid Huntsinger

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of tianyue
Sent: Monday, March 14, 2005 12:58 PM
To: r-help@stat.math.ethz.ch
Subject: [R] The corresponding Fortran77 codes for R function pt()


Hi,

I'm trying to find the corresponding Fortran77 subroutines for R 
function pt(). I tried some Fortran77 subroutines to compute the t 
distribution function. But none of them are as good as R function pt(). 
Does anyone can give me some information about it?

Thank you very much!

Tianyue

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

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


Re: [R] using postgresql with R/RODBC

2005-03-14 Thread Uwe Ligges
Larry White wrote:
There's only one CRAN RODBC entry under Packages (version 1.1.3). 
That's the one I used.  The  'Depends' line seems to indicate that it
should work with any version of R > 1.9.
Correct for the sources, but binaries must be compiled under the same 
major version for R that is used.


In any case, after I received the reply I went back to CRAN and took a
different path (under windows binaries) and located an earlier version
of RODBC (1.1.2).  When I tried that one I get this error:
Error in library(RODBC) : 'RODBC' is not a valid package -- installed < 2.0.0?
Aside from the Depends entry and the runtime error message there
doesn't seem to be any thing to indicate which version is appropriate
for R 2.0.1.
BTW, I'm on win 2000, if that would make a difference. 
That one you get when calling install.packages("RODBC") in R-2.0.x is in
CRAN/bin/windows/contrib/2.0/
for CRAN master this is currently:
http://cran.r-project.org/bin/windows/contrib/2.0/RODBC_1.1-3.zip
Uwe Ligges


On Mon, 14 Mar 2005 16:22:50 +0100, Uwe Ligges
<[EMAIL PROTECTED]> wrote:
Larry White wrote:

Hi, Please excuse these questions if they're obvious. I'm new to R.
I need to access a Postgres db from R.  I'm currently trying RODBC as
I spend part of my time on Windows and rdbi.pgsql seems not to support
windows at this time.
I unzipped the RODBC win binary download into my library directory and
tried to load it using
library(RODBC)
I get the following error:
Error in dyn.load(x, as.logical(local), as.logical(now)) :   unable to
load shared library
"C:/PROGRA~1/R/rw2001/library/RODBC/libs/RODBC.dll":
 LoadLibrary failure:  The specified procedure could not be found.
In addition: Warning message:  package 'RODBC' was built under R version 2.1.0
So why don't you use the binary package from CRAN that has been compiled
for you under R-2.0.1?
Uwe Ligges

Error: .onLoad failed in loadNamespace for 'RODBC'
Error in library(RODBC) : package/namespace load failed for 'RODBC'
The path correctly points to the dll. Can anyone tell me what I'm doing wrong?
thanks.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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


Re: [R] confidence level of kpss test

2005-03-14 Thread Rolf Turner
I ***do*** wish people wouldn't say ``confidence level'' when they
mean ``significance level''.  Confidence level refers to estimation
and significance level to hypothesis testing.  The two are closely
related but do not pack the same freight.

Moreover, if one indeed wishes to conflate the two ideas, the
confidence level of an estimation procedure is

***one minus***

the significance level of the corresponding hypothesis test.

cheers,

Rolf Turner
[EMAIL PROTECTED]

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


[R] par(new=TRUE) vs par(new=FALSE)

2005-03-14 Thread Dirk Enzmann
Just out of curiosity (and I hope that my question does not confuse 
those who intuitively understood the par(new=TRUE) statement right in 
the beginning):

I would like to know whether beginners (learning R) had the same 
difficulty as I had: Intuitively I thought that par(new=TRUE) would draw 
a new plot (and not into an already existing plot) and that 
par(new=FALSE) would not draw a new plot but draw into an already 
existing plot - opposed to what the par(new=TRUE) statement actually 
does. (It would be interesting to receive an answer also from those who 
meanwhile reached an expert status  in working with the R syntax). 
Perhaps my confusion is due to the fact that I am a trained right-handed 
that really is a left-handed (those people tend to mistake contrasts).

If there are a lot of people having this difficulty, I would like to 
know why the decision was made to define the mode of action of the 
par(new=TRUE) statement as it is now. Perhaps that helps me to 
understand better the way programmers tend to think.

*
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Schlueterstr. 28
D-20146 Hamburg
Germany
phone: +49-040-42838.7498 (office)
   +49-040-42838.4591 (Billon)
fax:   +49-040-42838.2344
email: [EMAIL PROTECTED]
www: 
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html

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


Re: [R] using postgresql with R/RODBC

2005-03-14 Thread Larry White
There's only one CRAN RODBC entry under Packages (version 1.1.3). 
That's the one I used.  The  'Depends' line seems to indicate that it
should work with any version of R > 1.9.

In any case, after I received the reply I went back to CRAN and took a
different path (under windows binaries) and located an earlier version
of RODBC (1.1.2).  When I tried that one I get this error:

Error in library(RODBC) : 'RODBC' is not a valid package -- installed < 2.0.0?

Aside from the Depends entry and the runtime error message there
doesn't seem to be any thing to indicate which version is appropriate
for R 2.0.1.

BTW, I'm on win 2000, if that would make a difference. 

On Mon, 14 Mar 2005 16:22:50 +0100, Uwe Ligges
<[EMAIL PROTECTED]> wrote:
> Larry White wrote:
> 
> > Hi, Please excuse these questions if they're obvious. I'm new to R.
> >
> > I need to access a Postgres db from R.  I'm currently trying RODBC as
> > I spend part of my time on Windows and rdbi.pgsql seems not to support
> > windows at this time.
> >
> > I unzipped the RODBC win binary download into my library directory and
> > tried to load it using
> >
> > library(RODBC)
> >
> > I get the following error:
> >
> > Error in dyn.load(x, as.logical(local), as.logical(now)) :   unable to
> > load shared library
> > "C:/PROGRA~1/R/rw2001/library/RODBC/libs/RODBC.dll":
> >   LoadLibrary failure:  The specified procedure could not be found.
> > In addition: Warning message:  package 'RODBC' was built under R version 
> > 2.1.0
> 
> So why don't you use the binary package from CRAN that has been compiled
> for you under R-2.0.1?
> 
> Uwe Ligges
> 
> 
> > Error: .onLoad failed in loadNamespace for 'RODBC'
> > Error in library(RODBC) : package/namespace load failed for 'RODBC'
> >
> > The path correctly points to the dll. Can anyone tell me what I'm doing 
> > wrong?
> >
> > thanks.
> >
> > __
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> 
>

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


[R] The corresponding Fortran77 codes for R function pt()

2005-03-14 Thread tianyue
Hi,
I'm trying to find the corresponding Fortran77 subroutines for R 
function pt(). I tried some Fortran77 subroutines to compute the t 
distribution function. But none of them are as good as R function pt(). 
Does anyone can give me some information about it?

Thank you very much!
Tianyue
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] confidence level of kpss test

2005-03-14 Thread Achim Zeileis
On Mon, 14 Mar 2005 18:36:30 +0100 Belén Martín Peiro wrote:

> Dear All,
> 
> I am trying to use kpss.test function so as to perform a stationarity
> test on a data sample. Is it possible to know the associated
> confidence level for this test?

As for most other tests implemented in R, a p value is reported so you
can use a confidence level of your choice. For some of the tests you
mention, the p values are approximated from tables of simulated
asymptotic critical values in the range of 0.1 and 0.01. You won't
obtain smaller or larger p values and can therefore use only confidence
levels within that range.
Z

> I have not seen any arguments related to it.
> I had a look at some other tests included in R (adf.test, pp.test,
> ks.test ...) and I could not find this information for them.
> 
> Thanks in advanced. Kind regards,
> 
> Belén
> __
> Este mensaje, y en su caso, cualquier fichero anexo al mismo,
>  puede contener informacion clasificada por su emisor como
>  confidencial en el marco de su Sistema de Gestion de Seguridad de la 
> Informacion siendo para uso exclusivo del destinatario, quedando 
> prohibida su divulgacion copia o distribucion a terceros sin la 
> autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
>  erroneamente, se ruega lo notifique al remitente y proceda a su
>  borrado. 
> Gracias por su colaboracion.
> __
> This message including any attachments may contain\ > conf...{{dropped}}

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


[R] confidence level of kpss test

2005-03-14 Thread Belén Martín Peiro
Dear All,

I am trying to use kpss.test function so as to perform a stationarity test on a 
data sample. Is it possible to know the associated confidence level for this 
test? I have not seen any arguments related to it.
I had a look at some other tests included in R (adf.test, pp.test, ks.test ...) 
and I could not find this information for them.

Thanks in advanced. Kind regards,

Belén
__
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la 
Informacion siendo para uso exclusivo del destinatario, quedando 
prohibida su divulgacion copia o distribucion a terceros sin la 
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado. 
Gracias por su colaboracion.
__
This message including any attachments may contain confident...{{dropped}}

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


[R] Significance of Principal Coordinates

2005-03-14 Thread Christian Kamenik
Dear all,
I was looking for methods in R that allow assessing the number of  
significant principal coordinates. Unfortunatly I was not very 
successful. I expanded my search to the web and Current Contents, 
however, the information I found is very limited.
Therefore, I tried to write code for doing a randomization. I would 
highly appriciate if somebody could comment on the following approach. I 
am neither a statistician, nor an R expert... the data matrix I used has 
72 species (columns) and 167 samples (rows).

Many thanks in advance, Christian
# focus on ~80% of all the eigenvalues
nEigen <- round(ncol(Data*0.8))
# Calculate Weights for Principal Coordinates Analysis
Total <- apply(Data,1,sum)
Weight <- round(Total/max(Total)*1000)
# Calculate Chord Distance
library(vegan)
Chord <- vegdist(decostand(Data, "norm"), "euclidean")
# Calculate Principal Coordinates, including distance matrix row weights
library(ade4)
PCoord.Eigen <- dudi.pco(Chord,row.w=Weight,scann=F,full=T)$eig[1:nEigen]
# Randomization of Principal Coordinates Analysis
library(labdsv)
for (i in 1:99) {
Data.random <- rndtaxa(Data,species=T,plots=T)
Total.random <- apply(Data.random,1,sum)
Weight.random <- round(Total.random/max(Total.random)*1000)
Chord.random <- vegdist(decostand(Data.random, "norm"), "euclidean")
PCoord.Eigen.random <- 
dudi.pco(Chord.random,row.w=Weight.random,scann=F,full=T)$eig[1:nEigen]
PCoord.Eigen <- cbind.data.frame(PCoord.Eigen, PCoord.Eigen.random)
}

# Plot scree diagramm with original eigenvalues and 95%-quantiles of 
eigenvalues from randomized principal coordinate analysis

plot(c(1:nEigen),PCoord.Eigen[,1],type="b")
lines(c(1:nEigen),apply(PCoord.Eigen[,-1],1,quantile,probs=c(0.95)),col="red")

Christian Kamenik
Institute of Plant Sciences
University of Bern
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Question about Tukey HSD (stat package)

2005-03-14 Thread JRG
On 14 Mar 2005 at 17:22, Peter Dalgaard wrote:

> "JRG" <[EMAIL PROTECTED]> writes:
> 
> > On 14 Mar 2005 at 16:13, Peter Dalgaard wrote:
> > 
> > > Alice Le Bars <[EMAIL PROTECTED]> writes:
> > > 
> > > > Dear all,
> > > > 
> > > > I would be glad if someone could tell me if Tukey HSD (function of
> > > > stats library) accept the NA values and could correct the unbalanced
> > > > design (different number of sample in each group)
> > > 
> > > I don't think the *theory* of the HSD allows this. There is some more
> > > or less well-founded speculation that if the imbalance is not too bad,
> > > then the HSD results are somewhat useful anyway, but please consider
> > > using the multcomp package, which is specifically designed to get
> > > these things right.
> > > 
> > 
> > I believe that Hayter (JASA, 1984, 12, 61--75) proves that the so-called 
> > Tukey-Kramer method is guarnateed to be conservative for 
> > any set of cell sizes --- under the usual ANOVA model, of course.
> 
> Make that Annals of Statistics, not JASA. 
> 
> Hayter proves that simultaneous confidence intervals based on using
> the Studentized range distribution with (1/ni+1/nj)/2 instead of 1/n
> will have coverage at least (1 - \alpha). He doesn't say *how*
> conservative it is, though, and it doesn't change the fact that
> multcomp has a better idea.
> 

Whoops, let it be Annals.  However, there is a paper by Dunnett (ca 1981) which 
I again believe to be JASA which shows that the 
degree of conservativism is pretty slight, over a broad range of cell sizes.  
Your point about multcomp stands.

---JRG




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


John R. Gleason
Associate Professor

Syracuse University
430 Huntington Hall  Voice:   315-443-3107
Syracuse, NY 13244-2340  USA FAX: 315-443-4085

PGP public key at keyservers

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


Re: [R] Question about Tukey HSD (stat package)

2005-03-14 Thread Peter Dalgaard
"JRG" <[EMAIL PROTECTED]> writes:

> On 14 Mar 2005 at 16:13, Peter Dalgaard wrote:
> 
> > Alice Le Bars <[EMAIL PROTECTED]> writes:
> > 
> > > Dear all,
> > > 
> > > I would be glad if someone could tell me if Tukey HSD (function of
> > > stats library) accept the NA values and could correct the unbalanced
> > > design (different number of sample in each group)
> > 
> > I don't think the *theory* of the HSD allows this. There is some more
> > or less well-founded speculation that if the imbalance is not too bad,
> > then the HSD results are somewhat useful anyway, but please consider
> > using the multcomp package, which is specifically designed to get
> > these things right.
> > 
> 
> I believe that Hayter (JASA, 1984, 12, 61--75) proves that the so-called 
> Tukey-Kramer method is guarnateed to be conservative for 
> any set of cell sizes --- under the usual ANOVA model, of course.

Make that Annals of Statistics, not JASA. 

Hayter proves that simultaneous confidence intervals based on using
the Studentized range distribution with (1/ni+1/nj)/2 instead of 1/n
will have coverage at least (1 - \alpha). He doesn't say *how*
conservative it is, though, and it doesn't change the fact that
multcomp has a better idea.

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

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


[R] Bug on MWC1019?

2005-03-14 Thread Guido Montorsi
Dear R-developer (Marsaglia??)

The following  piece of code from package SuppDist , routine "dist.cc" seems
to have a bug

ULONG MWC1019(void){
ULONG long t;
int i = endQ-1;

t = 147669672LL*Q[i] + Q[endQ];
Q[endQ] = (t>>32);
if(i>0)
return(Q[i--] = t);
i = endQ-1;
return(Q[0] = t);
}

in fact , being "i" a local variable that have automatic storage, it is
initialized to endQ-1 (1019)
 each time the routine is called so that it can never
cycle through all values as it should.

I think it should be declared as static:

ULONG MWC1019(void){
ULONG long t;
static int  i = endQ-1;

t = 147669672LL*Q[i] + Q[endQ];
Q[endQ] = (t>>32);
if(i>0)
return(Q[i--] = t);
i = endQ-1;
return(Q[0] = t);
}

Best regards,

Guido Montorsi

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


Re: [R] Question about Tukey HSD (stat package)

2005-03-14 Thread JRG
On 14 Mar 2005 at 16:13, Peter Dalgaard wrote:

> Alice Le Bars <[EMAIL PROTECTED]> writes:
> 
> > Dear all,
> > 
> > I would be glad if someone could tell me if Tukey HSD (function of
> > stats library) accept the NA values and could correct the unbalanced
> > design (different number of sample in each group)
> 
> I don't think the *theory* of the HSD allows this. There is some more
> or less well-founded speculation that if the imbalance is not too bad,
> then the HSD results are somewhat useful anyway, but please consider
> using the multcomp package, which is specifically designed to get
> these things right.
> 

I believe that Hayter (JASA, 1984, 12, 61--75) proves that the so-called 
Tukey-Kramer method is guarnateed to be conservative for 
any set of cell sizes --- under the usual ANOVA model, of course.

---JRG




> -- 
>O__   Peter Dalgaard Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
> ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


John R. Gleason

Syracuse University
430 Huntington Hall  Voice:   315-443-3107
Syracuse, NY 13244-2340  USA FAX: 315-443-4085

PGP public key at keyservers

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


Re: [R] RODBC Package

2005-03-14 Thread Don MacQueen
The read.xls() function in the gdata package in the gregmisc bundle 
will import data from Excel spreadsheets on OS X.

I've used it with R 2.0.1 on Mac OS X 10.2.8, and the current version of Excel.
-Don
At 9:53 AM + 3/11/05, Stephan Freyberger wrote:
Hello R-Help,
is there any way of using the RODBC Package on a Mac OS X
System? If yes, what do I need to get it running. Concerning these
issues, I am pretty unexperienced, so please state any step
necessary. The actual problem is accessing data in Excel- files.
(unfortunately no alternative way of entering the data).
I already installed the Package, but it says the following:
 versuch <- odbcConnectExcel("Thermanali-Versuch.xls")
Error: couldn't find function "odbcConnectExcel"
Thanks in Advance
Stephan Freyberger
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] using postgresql with R/RODBC

2005-03-14 Thread Uwe Ligges
Larry White wrote:
Hi, Please excuse these questions if they're obvious. I'm new to R.
I need to access a Postgres db from R.  I'm currently trying RODBC as
I spend part of my time on Windows and rdbi.pgsql seems not to support
windows at this time.
I unzipped the RODBC win binary download into my library directory and
tried to load it using
library(RODBC)
I get the following error:
Error in dyn.load(x, as.logical(local), as.logical(now)) :   unable to
load shared library
"C:/PROGRA~1/R/rw2001/library/RODBC/libs/RODBC.dll":
  LoadLibrary failure:  The specified procedure could not be found.
In addition: Warning message:  package 'RODBC' was built under R version 2.1.0 
So why don't you use the binary package from CRAN that has been compiled 
for you under R-2.0.1?

Uwe Ligges

Error: .onLoad failed in loadNamespace for 'RODBC'
Error in library(RODBC) : package/namespace load failed for 'RODBC'
The path correctly points to the dll. Can anyone tell me what I'm doing wrong? 

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


Re: [R] New user of R on Mac OS X - Please help

2005-03-14 Thread Don MacQueen
First, try to find out where in your function the 
error occurred. Exactly what R expression 
resulted in that error message?

Then ask again, providing that information.
I have been using R on OS X since it first became 
available on OS X, and have never seen an error 
message even remotely similar to this one. So you 
will have to provide more information about what 
you were trying to do.

-Don
p.s.
See also 
At 3:44 PM +0100 3/12/05, Depiereux Constant wrote:
Brand new Mac OS X user, I am transfering my R stuffs from my windows machine.
When porting some of my functions, I got messages such as  :
2005-03-12 15:37:52.456 R[673] *** NSTimer 
discarding exception 'NSRangeException' (reason 
'*** NSRunStorage, _NSBlockNumberForIndex(): 
index (3607) beyond array bounds (2000)') that 
raised during firing of timer with target 3ba850 
and selector 'runRELP:'

Does any body of you have any idea where I 
should be starting looking for a solution for 
ditto?

Thnaks in advance four your help.
Constant Depièreux
Managing Director
Applied Quality Technologies Europe sprl
Rue des Déportés 123, B4800   Verviers
Tel : + 32 87 29 21 75
Fax : +32 87 29 21 71
Mobile : +32 475 555 818
e-Mail : [EMAIL PROTECTED]
Web presence : http://www.aqte.be
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Question about Tukey HSD (stat package)

2005-03-14 Thread Peter Dalgaard
Alice Le Bars <[EMAIL PROTECTED]> writes:

> Dear all,
> 
> I would be glad if someone could tell me if Tukey HSD (function of
> stats library) accept the NA values and could correct the unbalanced
> design (different number of sample in each group)

I don't think the *theory* of the HSD allows this. There is some more
or less well-founded speculation that if the imbalance is not too bad,
then the HSD results are somewhat useful anyway, but please consider
using the multcomp package, which is specifically designed to get
these things right.

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

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


[R] using postgresql with R/RODBC

2005-03-14 Thread Larry White
Hi, Please excuse these questions if they're obvious. I'm new to R.

I need to access a Postgres db from R.  I'm currently trying RODBC as
I spend part of my time on Windows and rdbi.pgsql seems not to support
windows at this time.

I unzipped the RODBC win binary download into my library directory and
tried to load it using

library(RODBC)

I get the following error:

Error in dyn.load(x, as.logical(local), as.logical(now)) :   unable to
load shared library
"C:/PROGRA~1/R/rw2001/library/RODBC/libs/RODBC.dll":
  LoadLibrary failure:  The specified procedure could not be found.
In addition: Warning message:  package 'RODBC' was built under R version 2.1.0 
Error: .onLoad failed in loadNamespace for 'RODBC'
Error in library(RODBC) : package/namespace load failed for 'RODBC'

The path correctly points to the dll. Can anyone tell me what I'm doing wrong? 

thanks.

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


Re: [R] how to draw the data set processed by hclust?

2005-03-14 Thread Ale? ?iberna
type
?hclust
for how to use hclut, for example
hc <- hclust(dist(USArrests), "ave")
Notice that you have to first compute the distance matrix with function 
"dist" or simmilar.

to get groups see
?cutree
for expamle for three grouops use k=3
groups<-cutree(hc,k=3)
and then plot using
plot(USArrests,col=groups)
I hope this help! In the future, PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html and follow the instructions 
(read help pages)!


- Original Message - 
From: "XP Sun" <[EMAIL PROTECTED]>
To: 
Sent: Sunday, March 13, 2005 1:23 PM
Subject: [R] how to draw the data set processed by hclust?


hi, all
  i hava a dataset formated as follow:
x1 y1 z1
x2 y2 z2
x3 y3 z3
...
how to cluster it with hclust?
and the draw the data with color of cluster?
thank you in advance!
best!
xpsun
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


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


[R] Question about Tukey HSD (stat package)

2005-03-14 Thread Alice Le Bars
Dear all,
I would be glad if someone could tell me if Tukey HSD (function of stats 
library) accept the NA values and could correct the unbalanced design 
(different number of sample in each group)

Thanks for help
Alice Le Bars
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] postscript rotation (bug?)

2005-03-14 Thread Marc Schwartz
On Mon, 2005-03-14 at 15:16 +, Wouter Buytaert wrote:
> hello,
> 
> when making postscript images with postscript() and converting them to
> pdf with epstopdf, some images are rotated 90 degrees clockwise. The
> postscript displays fine (ggv).
> 
> It seems to be related with length(xlab)/length(ylab), e.g:
> 
> >postscript("wrong.ps", width=5, height=5, horizontal=F, onefile=F,
> paper = "special")
> >plot(1, 1, xlab="short", ylab="abitlonger")
> >dev.off()
> 
> If then converted to pdf with epstopf, then wrong.pdf is rotated
> 
> However,
> 
> >postscript("OK.ps", width=5, height=5, horizontal=F, onefile=F, paper =
> "special")
> >plot(1, 1, xlab="equal", ylab="equal")
> >dev.off()
> 
> en then converted to OK.pdf displays OK.
> 
> Setting horizontal=T does not change anything for the final pdf file.
> (The .ps is rotated -90 degrees however).
> 
> Is anyone able to reproduce this problem? I am using fedora core 3.

There was just a discussion on this. See this thread:

https://stat.ethz.ch/pipermail/r-help/2005-March/065593.html

HTH,

Marc Schwartz

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


[R] postscript rotation (bug?)

2005-03-14 Thread Wouter Buytaert

hello,

when making postscript images with postscript() and converting them to
pdf with epstopdf, some images are rotated 90 degrees clockwise. The
postscript displays fine (ggv).

It seems to be related with length(xlab)/length(ylab), e.g:

>postscript("wrong.ps", width=5, height=5, horizontal=F, onefile=F,
paper = "special")
>plot(1, 1, xlab="short", ylab="abitlonger")
>dev.off()

If then converted to pdf with epstopf, then wrong.pdf is rotated

However,

>postscript("OK.ps", width=5, height=5, horizontal=F, onefile=F, paper =
"special")
>plot(1, 1, xlab="equal", ylab="equal")
>dev.off()

en then converted to OK.pdf displays OK.

Setting horizontal=T does not change anything for the final pdf file.
(The .ps is rotated -90 degrees however).

Is anyone able to reproduce this problem? I am using fedora core 3.

Thanks,

Wouter

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


[R] R: install - Perl dependency problem in Debian/Damn Small Linux

2005-03-14 Thread Stuart Leask
(I vaguely recall a suggestion there be a r-debian list, which this would be
appropriate for, but I can't find such a list if it exists. Apologies)

OS: Damn Small Linux 1.0rc1 - a tiny (50MB) debian/knoppix-based distro

I can't apt-get R.

[EMAIL PROTECTED] apt-get  install -testing r-base r-base-core r-recommended
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  r-base-core: Depends: perl but it is not going to be installed
E: Broken packages

PROBLEM 1: Perl is certainly installed. However, it may have various bits
removed to save space.

However, if I try to correct this with:

apt-get install perl

I get:

The following packages have unmet dependencies:
  perl: depends perl-base (=5.6.1-8.7) but 5.8.0-18 is to be installed
E: broken packages

I've tried different feeds eg. -testing, but get the same problem.

Has anyone come across this, or have any ideas?

Stuart


Dr Stuart Leask DM MRCPsych, Senior Lecturer
University Dept of Psychiatry, Duncan Macmillan House
Porchester Road, Nottingham. NG3 6AA. UK
tel. 0115 924 9924 xtn 40784
http://www.nottingham.ac.uk/psychiatry/staff/s_leask.html


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

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


Re: [R] r: eviews and r // eigen analysis

2005-03-14 Thread Michael Grant
It been thirty years since I was emeshed in QM and
lost in Hilbert space :O). So if I'm sloppy
some-someone correct me. IN A NUTSHELL: Note one
vector is the same in both sets (except for the sign).
Necessarily, the four remaining vectors (degenerate
BTW) in each set span the same subspace, i.e., form an
orthonormal basis for that subspace. One should rotate
into the other. It would be a nice exercise (really)to
convince yourself of that, providing some feel, i.e.,
visualization, of what you are dealing with.

Regards,
Michael Grant 


--- Clark Allan <[EMAIL PROTECTED]> wrote:
> hi all
> 
> i have a question that about the eigen analysis
> found in R and in
> eviews.
> 
> i used the same data set in the two packages and
> found different
> answers. which is incorrect?
> 
> the data is:
> aa ( a correlation matrix)
> 
> 1 0.9801  0.9801  0.9801  0.9801
> 0.98011   0.9801  0.9801  0.9801
> 0.98010.9801  1   0.9801  0.9801
> 0.98010.9801  0.9801  1   0.9801
> 0.98010.9801  0.9801  0.9801  1
> 
> now
> > svd(aa)
> $d
> [1] 4.9204 0.0199 0.0199 0.0199 0.0199
> 
> $u
>[,1]  [,2]  [,3] 
> [,4]   [,5]
> [1,] -0.4472136  9.283999e-18  1.939587e-17
> -2.101554e-15  0.8944272
> [2,] -0.4472136  8.089763e-01  7.115435e-17 
> 3.091235e-01 -0.2236068
> [3,] -0.4472136  2.178563e-02  8.226578e-18
> -8.657513e-01 -0.2236068
> [4,] -0.4472136 -4.153810e-01 -7.071068e-01 
> 2.783139e-01 -0.2236068
> [5,] -0.4472136 -4.153810e-01  7.071068e-01 
> 2.783139e-01 -0.2236068
> 
> $v
>[,1][,2]  [,3]   [,4]
>   [,5]
> [1,] -0.4472136  0.  0.00e+00  0.000
>  0.8944272
> [2,] -0.4472136  0.80897632 -4.976488e-17  0.3091235
> -0.2236068
> [3,] -0.4472136  0.02178563  1.077421e-17 -0.8657513
> -0.2236068
> [4,] -0.4472136 -0.41538097 -7.071068e-01  0.2783139
> -0.2236068
> [5,] -0.4472136 -0.41538097  7.071068e-01  0.2783139
> -0.2236068
> 
> the results from Eviews is:
> 
> eigenvectors = (note that Eviews arranges the eigen
> vectors in ascending
> order of the size of the eigen values)
> 
>  0.305963 -0.266024   -0.219066   -0.7665690.447214
>  0.315257 -0.6038710.0757720.5746400.447214
>  0.461958  0.7268610.1993850.1360620.447214
> -0.482609  0.185567   -0.7007050.2041240.447214
> -0.600569 -0.0425340.644614   -0.1482580.447214
> 
> eigen values =
> 
>  0.019900
>  0.019900
>  0.019900
>  0.019900
>  4.920400
> 
> NOTE THAT THE EIGEN VALUES ARE THE SAME BUT THE
> EIGEN VECTORS ARE NOT!!!
> 
> why is this so?
> 
> if one sets aa=
>  1.00  0.500.25
>  0.50  1.000.35
>  0.25  0.351.00
> 
> 
> then both packages give the same answers.>
__
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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


[R] Parameters of Weibull regression

2005-03-14 Thread Christian Hennig
Dear list, dear Frank,

I try to fit a Weibull survival regression model with package Design:

sclear <- psm(sobj~V1+V2,dist="weibull")

sobj is a one-dimensional survival object (no event indicators), V1 and V2
are factors. 

I get the following result:

Parametric Survival Model: Weibull Distribution

psm(formula = sobj ~ V1 + V2, dist = "weibull")

   Obs Events Model L.R.   d.f.  P R2 
   120120  30.96  3  0   0.23 

  Value Std. Error  zp
(Intercept)  2.6161 0.0639  40.94 0.00e+00
V1=2 0.3098 0.0748   4.14 3.47e-05
V1=3 0.0911 0.0741   1.23 2.19e-01
V2=2-0.2212 0.0613  -3.61 3.09e-04
Log(scale)  -1.1060 0.0704 -15.70 1.52e-55

Scale= 0.331 

I wonder how to relate the estimated parameters to the Weibull regression
model. Here is the model specification from Harrel, Regression Modeling
Strategies, p. 422:

S(t|X)=exp[-\alpha*t^\gamma exp(X\beta)]

This is the model without intercept, and it is indicated that \alpha can be
replaced by exp(\beta_0) in the model with intercept.

Now I am puzzled by the fact that \alpha (or \alpha exp(X\beta))
is usually referred to as
"scale parameter" in the context of the Weibull distribution. If this would
be the case, I could get the Weibull scale from the \beta/\beta_0 estimators
and I would need an estimator for \gamma. But only one further estimator is
given which is called "scale". This is definitely not the \gamma estimator,
because if I compute, say, median estimators, I get a result outside the
value range. From survplot I know that the model fit of the survival
function is OK, so in principle it seems that I did the right thing.

But how do I relate the output to the parameters
\alpha,\gamma,\beta in the model?

Thanks,
Christian

***
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
[EMAIL PROTECTED], http://www.math.uni-hamburg.de/home/hennig/
>From 1 April 2005: Department of Statistical Science, UCL, London
###
ich empfehle www.boag-online.de

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


Re: [R] Problem updating mgcv package

2005-03-14 Thread Prof Brian Ripley
On Mon, 14 Mar 2005, Arin Basu wrote:
I tried to update the package mgcv from my current version 1.1-8 to mgcv 
version 1.2. Using the command update.packages("mgcv") to update mgcv 
failed in my computer and the returning message was:

"Error in old.packages(lib.loc=lib.loc, contriburl=contriburl, 
method=method, :no installed.packages for (?invalid) lib.loc=mgcv"

When I typed installed.packages(), I got the following information
libpath = "/usr/local/lib/R/site-library" for the installed package "mgcv".
My next error was when I typed
update.packages("mgcv",lib.loc="/usr/local/lib/R/site-library").
It returned the error message,
"error in download.file(url = paste(contriburl, "PACKAGES", sep="/"), :unsupported 
URL scheme"
What should I do to correctly update this package?
Either update.packages() or install.packages("mgcv")
Please read the help page before posting.
--
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
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] AR-ARCH specification and forecast

2005-03-14 Thread francoisromain
Hello list,

I use the packages tseries and fSeries to perform a time series analysis.
I have a model with an AR specification for the mean and an ARCH(1)
specification for the variance.

I just wonder if there is something to compute a forecast with that
specification and also if there is possible to get the AIC for such
AR-ARCH model.

Thanks to all.

Romain.

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


RE: [R] Problem updating mgcv package

2005-03-14 Thread Liaw, Andy
> From: Arin Basu
> 
> Hi All:
> 
> I tried to update the package mgcv from my current version 
> 1.1-8 to mgcv version 1.2. Using the command 
> update.packages("mgcv") to update mgcv failed in my computer 
> and the returning message was:
> 
> "Error in old.packages(lib.loc=lib.loc, 
> contriburl=contriburl, method=method, :no installed.packages 
> for (?invalid) lib.loc=mgcv"
> 
> When I typed installed.packages(), I got the following information
> 
> libpath = "/usr/local/lib/R/site-library" for the installed 
> package "mgcv".
> 
> My next error was when I typed 
> update.packages("mgcv",lib.loc="/usr/local/lib/R/site-library").
> It returned the error message, 
> 
> "error in download.file(url = paste(contriburl, "PACKAGES", 
> sep="/"), :unsupported URL scheme"
> 
> What should I do to correctly update this package?


Reading the help file for update.packages() before posting to the list
certainly would help.  You don't specify the name of the package to update.

Andy
 
> I use Debian Linux (MepisLinux), R version 2.0.1
> 
> Would greatly appreciate your advice.
> 
> TIA,
> Arin Basu
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>

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


[R] Problem updating mgcv package

2005-03-14 Thread Arin Basu
Hi All:

I tried to update the package mgcv from my current version 1.1-8 to mgcv 
version 1.2. Using the command update.packages("mgcv") to update mgcv failed in 
my computer and the returning message was:

"Error in old.packages(lib.loc=lib.loc, contriburl=contriburl, method=method, 
:no installed.packages for (?invalid) lib.loc=mgcv"

When I typed installed.packages(), I got the following information

libpath = "/usr/local/lib/R/site-library" for the installed package "mgcv".

My next error was when I typed 
update.packages("mgcv",lib.loc="/usr/local/lib/R/site-library").
It returned the error message, 

"error in download.file(url = paste(contriburl, "PACKAGES", sep="/"), 
:unsupported URL scheme"

What should I do to correctly update this package?

I use Debian Linux (MepisLinux), R version 2.0.1

Would greatly appreciate your advice.

TIA,
Arin Basu

[[alternative HTML version deleted]]

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


[R] r: eviews and r // eigen analysis

2005-03-14 Thread Clark Allan
hi all

i have a question that about the eigen analysis found in R and in
eviews.

i used the same data set in the two packages and found different
answers. which is incorrect?

the data is:
aa ( a correlation matrix)

1   0.9801  0.9801  0.9801  0.9801
0.9801  1   0.9801  0.9801  0.9801
0.9801  0.9801  1   0.9801  0.9801
0.9801  0.9801  0.9801  1   0.9801
0.9801  0.9801  0.9801  0.9801  1

now
> svd(aa)
$d
[1] 4.9204 0.0199 0.0199 0.0199 0.0199

$u
   [,1]  [,2]  [,3]  [,4]   [,5]
[1,] -0.4472136  9.283999e-18  1.939587e-17 -2.101554e-15  0.8944272
[2,] -0.4472136  8.089763e-01  7.115435e-17  3.091235e-01 -0.2236068
[3,] -0.4472136  2.178563e-02  8.226578e-18 -8.657513e-01 -0.2236068
[4,] -0.4472136 -4.153810e-01 -7.071068e-01  2.783139e-01 -0.2236068
[5,] -0.4472136 -4.153810e-01  7.071068e-01  2.783139e-01 -0.2236068

$v
   [,1][,2]  [,3]   [,4]   [,5]
[1,] -0.4472136  0.  0.00e+00  0.000  0.8944272
[2,] -0.4472136  0.80897632 -4.976488e-17  0.3091235 -0.2236068
[3,] -0.4472136  0.02178563  1.077421e-17 -0.8657513 -0.2236068
[4,] -0.4472136 -0.41538097 -7.071068e-01  0.2783139 -0.2236068
[5,] -0.4472136 -0.41538097  7.071068e-01  0.2783139 -0.2236068

the results from Eviews is:

eigenvectors = (note that Eviews arranges the eigen vectors in ascending
order of the size of the eigen values)

 0.305963   -0.266024   -0.219066   -0.7665690.447214
 0.315257   -0.6038710.0757720.5746400.447214
 0.4619580.7268610.1993850.1360620.447214
-0.4826090.185567   -0.7007050.2041240.447214
-0.600569   -0.0425340.644614   -0.1482580.447214

eigen values =

 0.019900
 0.019900
 0.019900
 0.019900
 4.920400

NOTE THAT THE EIGEN VALUES ARE THE SAME BUT THE EIGEN VECTORS ARE NOT!!!

why is this so?

if one sets aa=
 1.000.500.25
 0.501.000.35
 0.250.351.00


then both packages give the same answers.__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE: [R] 'pch' plot symbol with more than one character

2005-03-14 Thread Gesmann, Markus

This might do what you want:

> plot.new()
> plot.window(xlim=c(1,10), ylim=c(1,10))
> text(x=1:10, y=1:10, labels="Hallo")

Look at ?text

Regards

Markus


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Ridao Cruz
Sent: 14 March 2005 10:37
To: r-help@stat.math.ethz.ch
Subject: [R] 'pch' plot symbol with more than one character


R-help,

Argument 'pch' in 'plot' can only represent a single character.
Is it possible to represent, let's say, two instead?

Thanks in advance.

I'm running on Windows Xp

> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor0.1
year 2004   
month11 
day  15 
language R

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

LNSCNTMCS01***
The information in this E-Mail and in any attachments is CON...{{dropped}}

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


[R] 'pch' plot symbol with more than one character

2005-03-14 Thread Luis Ridao Cruz
R-help,

Argument 'pch' in 'plot' can only represent a single character.
Is it possible to represent, let's say, two instead?

Thanks in advance.

I'm running on Windows Xp

> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor0.1
year 2004   
month11 
day  15 
language R

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