[R] Re: memory problems

2003-01-29 Thread Ott Toomet
Hi, well, it is always a good bet to start with a small subset of your data. Increase it and take a look what happens and how much memory it takes (object.size() should give the size of the oject in memory, use OS-tools to check the size of the whole process). There may also be some OS-related

[R] printing reals from C with digits

2003-01-29 Thread Ott Toomet
Hi, I want to print real numbers in C code with different values for digits. How to do that? As I have understood, what I should do is to call StringFromReal() which calls FormatReal(), that one suggests the parameters (width, decimal places and exponential form). FormatReal() includes

Re: [R] printing reals from C with digits

2003-01-29 Thread Prof Brian D Ripley
On Wed, 29 Jan 2003, Ott Toomet wrote: I want to print real numbers in C code with different values for digits. How to do that? Use Rprintf or PrintValue. You'll need to work hard to convince me that Rprintf is not adequate. As I have understood, what I should do is to call

[R] Scoping rule problem?!? step does not work in function

2003-01-29 Thread Winfried Theis
Hello! I would like to use step() in a function because I have a list of responses (independent!) with equal influence and want to apply stepwise regression on each of them. So the function I just tested is the following: fitlms - function(y,infl,formel=NULL){ if(is.null(formel)){

[R] Analyzing an unbalanced AB/BA cross-over design

2003-01-29 Thread martin wolfsegger
I am looking for help to analyze an unbalanced AB/BA cross-over design by requesting the type III SS ! # Example 3.1 from S. Senn (1993). Cross-over Trials in Clinical Research outcome-c(310,310,370,410,250,380,330,270,260,300,390,210,350,365,370,310,380,290,260,90,385,400,410,320,340,220)

[R] CGIwithR version 0.40

2003-01-29 Thread David Firth
A new version of the CGIwithR package is now at CRAN. Version 0.40 has the following improvements: -- more comprehensive decoding of form data -- images are no longer cached by browsers -- buffering of the output page to avoid server/browser sync problems Still for unix-like systems only.

Re: [R] calling sweave function from latex

2003-01-29 Thread Friedrich . Leisch
On Wed, 29 Jan 2003 14:12:15 +1300, Sam McClatchie (SM) wrote: System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I've been calling R-code embedded in my LaTex document using Sweave, but would like to make things more

[R] Array of 3D

2003-01-29 Thread Francisco do Nascimento Junior
Hi, Can be created an Array of 3 dimensions in R? How? Tks, Francisco. ^^ Francisco Júnior, Computer Science - UFPE-Brazil One life has more value that the world whole ^^ __

[R] substitute, eval and hastables

2003-01-29 Thread Serge Boiko
I have the following problem. I have an automatically generated named list with stringified names: a - list(A=..., B=..., C=..., ) then I want to refer to the elements of the list, stored as an vector of names: nn - c(A, B, C), so that I could get list elements like a$nn[1], a$nn[2], etc.

Re: [R] Analyzing an unbalanced AB/BA cross-over design

2003-01-29 Thread Peter Dalgaard BSA
martin wolfsegger [EMAIL PROTECTED] writes: I am looking for help to analyze an unbalanced AB/BA cross-over design by requesting the type III SS ! # Example 3.1 from S. Senn (1993). Cross-over Trials in Clinical Research

Re: [R] substitute, eval and hastables

2003-01-29 Thread Robert Gentleman
On Wed, Jan 29, 2003 at 01:07:52PM +0100, Serge Boiko wrote: I have the following problem. I have an automatically generated named list with stringified names: a - list(A=..., B=..., C=..., ) then I want to refer to the elements of the list, stored as an vector of names: nn - c(A, B,

RE: [R] Array of 3D

2003-01-29 Thread Winfried Theis
Hi, try ?array. So long, Winfried On 29-Jan-03 Francisco do Nascimento Junior wrote: Hi, Can be created an Array of 3 dimensions in R? How? Tks, Francisco. ^^ Francisco Júnior, Computer Science - UFPE-Brazil One life has more value that the

Re: [R] random number generator?

2003-01-29 Thread Bob Wheeler
Well if the base generator is to be changed, it might be a good idea to consider implementing one of Marsaglia's really long period generators. His latest, using titanic primes, has a period of 2^131086. It is extremely fast. Even more could be done, by replacing the two phase normal generator by

RE: [R] random number generator?

2003-01-29 Thread Liaw, Andy
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] AL == Andy Liaw Liaw writes: AL Might I suggest taking a poll (even though unscientific) of how many people AL will be affected by a change in default RNG? My totally arbitrary guess is AL very few, if any. But they

Re: [R] Help!!

2003-01-29 Thread Roger Koenker
If you have a dominating density, ie another density, say g, such that cg(x)f(x) for some coo and all x, then you can easily do this by rejection. See, e.g. Luc Devroye's Springer book, which is the bible on this sort of thing url:www.econ.uiuc.edu Roger Koenker Dept. of

Re: [R] Help!!

2003-01-29 Thread Peter Dalgaard BSA
Duncan Murdoch [EMAIL PROTECTED] writes: On Tue, 28 Jan 2003 16:01:06 +, you wrote in message [EMAIL PROTECTED]: Dear R ers, if some can tel me how I can generate a sample from a given density. I have a complex 2D density function en I want to genearte a sample from it? Any

Re: [R] Help!!

2003-01-29 Thread Duncan Murdoch
On 29 Jan 2003 16:28:57 +0100, Peter Dalgaard BSA [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]: MCMC has big difficulty in generating *independent* samples. That's true. For an IID sample, a rejection sampler (if you can do the calculus) is usually more efficient. To get a a truly

RE: [R] random number generator?

2003-01-29 Thread Bruce D McCullough
With respect to the method used to produce normals, Professor Ripley noted: Were it not for concerns about reproducibility we would have switched to Inversion a while back. Presumably this refers to reproducibility across platforms. I searched the archive and could find nothing on this

Re: [R] Curve Fitting Question - Newbie

2003-01-29 Thread Douglas Bates
Simon Blomberg [EMAIL PROTECTED] writes: One way would be to use the nls package: library(nls) # your y values foo.dat - (0.83 * exp(-0.017 * 1:1000) + 0.5) + rnorm(1000,0,0.05) # create some x values in a data frame foo.dat - data.frame(cbind(foo.dat, 0:999)) names(foo.dat) - c(y,

[R] help on cut?

2003-01-29 Thread Nina Wawro
Dear R-users, I'm trying to recode a variable. After using cut(data.vector,breaks=my.breaks,labels=my.label) I need the data.vector to have the same values as the labels. To make it clear: x-runif(10) y-cut(x,breaks=c(0,0.3,0.7,0.9,1),labels=c(3,6,7,9)) as.numeric(y) returns something like a

RE: [R] help on cut?

2003-01-29 Thread Wiener, Matthew
cut returns a factor. Try something like t1 - cut(data.vector, breaks = my.breaks, labels = my.label) as.numeric(as.character(t1)) This is an issue that comes up frequently with factor. Take a look at the help page for factor for some warnings. Hope this helps, Matt Wiener -Original

Re: [R] help on cut?

2003-01-29 Thread Torsten Hothorn
Dear R-users, I'm trying to recode a variable. After using cut(data.vector,breaks=my.breaks,labels=my.label) I need the data.vector to have the same values as the labels. To make it clear: x-runif(10) y-cut(x,breaks=c(0,0.3,0.7,0.9,1),labels=c(3,6,7,9)) as.numeric(y) returns something

[R] Two y-axes for a plot

2003-01-29 Thread R A F
Hi, how would I plot two series in the same plot, but with two y-axes (one on the left and one on the right)? Would this be possible? [The two series have quite different y-values, so using the same y-axis for both is not possible.] Thanks very much!

Re: [R] na.rm in sd()

2003-01-29 Thread Thomas Lumley
On Wed, 29 Jan 2003, Heberto Ghezzo wrote: Hello, I think this qualify as a bug x-c(1,2,3,4,NA,6,7) mean(x) [1] NA mean(x,na.rm=T) [1] 3.83 sd(x) Error in var(as.vector(x)) : missing observations in cov/cor sd(x,na.rm=T) Error in sd(x, na.rm = T) : unused argument(s)

Re: [R] na.rm in sd()

2003-01-29 Thread Uwe Ligges
Heberto Ghezzo wrote: Hello, I think this qualify as a bug x-c(1,2,3,4,NA,6,7) mean(x) [1] NA mean(x,na.rm=T) [1] 3.83 sd(x) Error in var(as.vector(x)) : missing observations in cov/cor sd(x,na.rm=T) Error in sd(x, na.rm = T) : unused argument(s) (na.rm ...) var(x) Error in var(x)

[R] browser() misbehavior ?

2003-01-29 Thread Pikounis, Bill
Under v1.6.2, Windows NT4 OS, when a function contains an execution error and I have placed browser() in inside the function body, the call to browser is ignored. A brief example to illustrate: foo - function(x) { + y - x ^ 2 + browser() + foo2(x) ## Intentional error + x ^ 3 + }

[R] Error

2003-01-29 Thread Francisco do Nascimento Junior
people, I'm using the pixmap library and method read.pnm() for to read figures and it's giving the following error: Error in substr(inpstr, com1, stop = ns) : evaluation is nested too deeply: infinite recursion? I think that to be because of its size. Am I correct? Tks, Francisco.

Re: [R] random number generator?

2003-01-29 Thread ripley
On Wed, 29 Jan 2003, Paul Gilbert wrote: If reworking the RNG mechanism is considered seriously (and I am not advocating that), I suggest: 1/ There should be a simple mechanism for keeping track of and resetting all the information to generate random numbers, that is, seed, uniform

[R] multinomial conditional logit models

2003-01-29 Thread John Hendrickx
A multinomial logit model can be specified as a conditional logit model after restructuring the data. Doing so gives flexibility in imposing restrictions on the dependent variable. One application is to specify a loglinear model for square tables, e.g. quasi-symmetry or quasi-independence, as a

Re: [R] random number generator?

2003-01-29 Thread Peter Dalgaard BSA
[EMAIL PROTECTED] writes: That's what RNGkind and set.seed do, and have done for a long time. The information is also stored in .Random.seed, but few users would record that (and it does not exist until the first RNG is used). .. but if you don't set the seed, you shouldn't expect

[R] Course***R/Splus Fundamentals and Programming Techniques***February 2003

2003-01-29 Thread elvis
XLSolutions Corporation (www.xlsolutions-corp.com) is pleased to announce a two-day R course, R Fundamentals and Programming Techniques: Houston, Tx February 21-22 Atlanta February 24-25 London, UK - February 27-28 Early bird registration:

[R] problems with by()

2003-01-29 Thread Heberto Ghezzo
Hello, another problem. x-rep(1,10) y-rep(c(1,2),c(5,5)) z-seq(1:10) ab-data.frame(x,y,z) # now I want to do some work by the value of 'y' by(ab,y,mean) y: 1 x y z 1 1 3 y: 2 x y z 1 2 8 # I do not want all the means, only the

Re: [R] Error

2003-01-29 Thread Roger Bivand
(Please use a more informative Subject:, for example naming the package. I haven't changed the Subject:, but it should be substr() error in read.pnm) On Wed, 29 Jan 2003, Francisco do Nascimento Junior wrote: people, I'm using the pixmap library and method read.pnm() for to read figures and

Re: [R] problems with by()

2003-01-29 Thread Brett Magill
x-rep(1,10) y-rep(c(1,2),c(5,5)) z-seq(1:10) ab-data.frame(x,y,z) tapply(ab$z,ab$y,mean) 1 2 3 8 ---Original Message--- From: Heberto Ghezzo [EMAIL PROTECTED] Sent: 01/29/03 03:24 PM To: r-help [EMAIL PROTECTED] Subject: [R] problems with by() so, how can I get the function(x) to

[R] Error using read.pnm() of pixmap

2003-01-29 Thread Francisco do Nascimento Junior
people, I'm using the pixmap library and method read.pnm() for to read figures and it's giving the following error: Error in substr(inpstr, com1, stop = ns) : evaluation is nested too deeply: infinite recursion? I think that to be because of its size. Am I correct? Tks, Francisco.

[R] RODBC sqlSave Error

2003-01-29 Thread Christian Schulz
Hi, i get error after using a data.frame with subset for sqlSave. What can i do ? It seems that lines like this in a data.frame structure are after subset deleted and cause the error ? - attr(*, variable.labels)= Named chr CUSID Welle Arbeitgeberfavorit1 Aktuelle Bewerbungssituation ...

Re: [R] RODBC sqlSave Error

2003-01-29 Thread ripley
The error is quite clear: the SQLexecute command failed. That's not an R error, but an SQL error, so ask your DBMS helpline. For example, does whatever DBMS this is support German labels? Does it support table names like mno.x? Do you have permissions to create tables? On Wed, 29 Jan

[R] Weird options(digits=n) behaviour

2003-01-29 Thread Fernando Henrique Ferraz Pereira da Rosa
I noticed some very weird behaviour of the function: options(digits=n), where n is the number of digits you would expect to get in R calculations. Let's take a example: options(digits=4) getdata(caso.pool.k3.r3.e2) [1] 6.053 2.641 -3.639 14.259 6.082 Which works fine... now,

Re: [R] browser() misbehavior ?

2003-01-29 Thread John Fox
Dear Bill, Your example works fine for me with R 1.6.2 under Windows 2000. The behaviour that you report should occur if you press RETURN at the browser prompt, but that seems unlikely. John At 02:07 PM 1/29/2003 -0500, Pikounis, Bill wrote: Under v1.6.2, Windows NT4 OS, when a function

Re: [R] Weird options(digits=n) behaviour

2003-01-29 Thread Peter Dalgaard BSA
Fernando Henrique Ferraz Pereira da Rosa [EMAIL PROTECTED] writes: options(digits=4) [1] 6.053 2.641 -3.639 14.259 6.082 [1] -0.03091 1.60310 -4.90588 5.07379 -0.04418 options(digits=2) [1] -0.031 1.603 -4.906 5.074 -0.044 [1] 6.1 2.6 -3.6 14.3 6.1 What is going on?

Re: [R] problems with by()

2003-01-29 Thread Thomas Lumley
On Wed, 29 Jan 2003, Heberto Ghezzo wrote: Hello, another problem. x-rep(1,10) y-rep(c(1,2),c(5,5)) z-seq(1:10) ab-data.frame(x,y,z) # now I want to do some work by the value of 'y' by(ab,y,mean) y: 1 x y z 1 1 3

[R] fptex link?

2003-01-29 Thread Kenneth Cabrera
Hi R developers: I am collecting the elements to Build R on W2K. But I found that the www.fptex.org link, lead me to www.dante.de site. In this site I don't found where to download the fptex software. And worst: ich spreche kein Deutch!!! Danke sehr!

Re: [R] fptex link?

2003-01-29 Thread Frank E Harrell Jr
Get FPTeX from ctan.org On Wed, 29 Jan 2003 19:55:27 -0500 Kenneth Cabrera [EMAIL PROTECTED] wrote: Hi R developers: I am collecting the elements to Build R on W2K. But I found that the www.fptex.org link, lead me to www.dante.de site. In this site I don't found where to download the

[R] Principal comp. scores in R

2003-01-29 Thread kenneth fortino
Hello, I am trying to run a PCA in R and I cannot get the PC scores for each of the values. Using pcX - princomp(X) then loadings(pcX) I can get a listing of the eigenvectors but not the actual PC scores for each value in the dataset. I greatly appreciate any help anyone can offer Thanks

[R] TukeyHSD and BIBD

2003-01-29 Thread Simon Wotherspoon
Hi, the function TukeyHSD gives incorrect results for balanced incomplete block designs, as the example below shows, but I can only half fix it. There are two problems, 1. It uses model.tables to estimate treatment means, 2. It uses the wrong standard error The first problem can be fixed

[R] Kruskal-Wallis, Friedman tests and Tukey HSD

2003-01-29 Thread Smit, A, Albertus, Dr
Dear all Is there any way of doing a Tukey HSD post-hoc test after a Kruskal- Wallis or Friedman rank sum test (in the ctest package)? Thanks in advance, Albertus Dr. Albertus J. Smit Department of Botany University of Cape Town Private Bag Rondebosch 7700 South Africa Tel. +27 21 689 3032