Re: [R] http proxies: setting and unsetting

2007-05-30 Thread Gabor Grothendieck
One other point. If you find you need to set a system or user environment variable then microsoft has a free tool called setx.exe that you can find here: http://support.microsoft.com/kb/927229 You can do this from within R using system(). On 5/30/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:

[R] [R-pkgs] new packages psyphy and MLDS

2007-05-30 Thread ken knoblauch
New packages psyphy and MLDS are available on CRAN: psyphy ncludes an assortment of functions useful in analyzing data from pyschophysical experiments. It includes functions for calculating d' from several different experimental designs, links for mafc to be used with the binomial

[R] [R-pkgs] DPpackage - New version

2007-05-30 Thread Alejandro Jara Vallejos
Dear List: I have uploaded version 1.0-4 of DPpackage on CRAN. Since the first version (1.0-0), I have not communicated the improvements of the package. I'll use this email to summarize its current status. The name of the package is motivated by the Dirichlet process. However, DPpackage

[R] functions without arguments

2007-05-30 Thread elyakhlifi mustapha
hello, I wanna know if it's possible to write functions without argument in order to understand that I write down an example f - function(){ for (i in 1:length(C[[1]]) { print(10*C[[1]][i]) } } I know that there are errors in this syntax

[R] Re : functions without arguments

2007-05-30 Thread justin bem
there are R function with zero args : plot.new,frame, colors. In your case make sure that you list C is present in environments that you use. Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295. - Message d'origine De : elyakhlifi mustapha [EMAIL

[R] Factor function: odd behavior when labels argument contains duplicates?

2007-05-30 Thread Steen Ladelund
Hi all. I think it would be nice to be able to combine levels of a factor on creation a la x - rep(0:5,5) y - factor(x,levels=0:5,labels=c('1','1',2:5)) ## (1) y [1] 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 1 1 2 3 4 5 Levels: 1 1 2 3 4 5 I thougt this would (should?) create a

[R] Re : functions without arguments

2007-05-30 Thread justin bem
You can see Lexical Scope and Statistical Computing, Robert Gentleman; Ross Ihaka Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295. - Message d'origine De : elyakhlifi mustapha [EMAIL PROTECTED] À : R-help@stat.math.ethz.ch Envoyé le : Mercredi, 30

[R] [ANN] Static and dynamic graphics course, July 2007, Salt Lake City

2007-05-30 Thread hadley wickham
We're pleased to announce a one day course covering static and dynamic graphics using R, ggplot and GGobi. The course will be held just before the JSM, on Saturday, 28 July 2007, in Salt Lake City. The course will be presented by Dianne Cook and Hadley Wickham. In the course you will learn: *

[R] white test to check homoscedasticity of the residuals

2007-05-30 Thread Benoit Chemineau
Hi R-programmers, I can't find find the White test to check the homoscedasticity of the residuals from a linear model. Could you please help me with this? Thank you ! BC [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] search path question

2007-05-30 Thread Barry Rowlingson
Prof Brian Ripley wrote: You could do this via a search_file() connection wrapper, but there is a problem with ensuring connections get closed (which on.exit does here). I'm not sure exactly what you mean by a 'search_file() connection wrapper', but I have realised that its probably a

[R] matrix in data.frame

2007-05-30 Thread Lina Hultin-Rosenberg
Dear list! I have run into a problem that seems very simple but I can't find any solution to it (have searched the internet, help-files and An introduction to R etc without any luck). The problem is the following: I would like to create a data.frame with two components (columns), the first

[R] Help me understand colours on linux

2007-05-30 Thread michael watson \(IAH-C\)
Hi Here is my sessionInfo(): Version 2.3.1 (2006-06-01) i686-redhat-linux-gnu attached base packages: [1] methods stats graphics grDevices utils datasets [7] base I have a function that is trying to draw rectangles using 136 different colours, and I get the following error:

Re: [R] functions without arguments

2007-05-30 Thread Petr Klasterecky
Sure it is possible, but it is a very bad and possibly dangerous idea, since you may not control what's passed to your function. Consider this example: x - 1:5 x [1] 1 2 3 4 5 foo - function(){mean(x)} foo() [1] 3 rm('x') foo() Error in mean(x) : object x not found It is much much

Re: [R] matrix in data.frame

2007-05-30 Thread michael watson \(IAH-C\)
Have you thought of using a list? a - matrix(1:10, nrow=2) b - 1:5 x - list(a=a, b=b) x $a [,1] [,2] [,3] [,4] [,5] [1,]13579 [2,]2468 10 $b [1] 1 2 3 4 5 x$a [,1] [,2] [,3] [,4] [,5] [1,]13579 [2,]2468

Re: [R] matrix in data.frame

2007-05-30 Thread Prof Brian Ripley
You need to use I() or something similar. E.g. A - matrix(1:6, 2,3) data.frame(x=1:2, I(A)) X - data.frame(x=1:2) X$A - A both insert A as a single column. On Wed, 30 May 2007, Lina Hultin-Rosenberg wrote: Dear list! I have run into a problem that seems very simple but I can't find any

Re: [R] comparing fit of cubic spline

2007-05-30 Thread Simon Wood
On Monday 21 May 2007 16:17, Thomas Reed wrote: I want to compare the fit of a quadratic model to continuous data, with that of a cubic spline fit. Is there a way of computing AIC from for e.g. a GAM with a smoothing spine, and comparing this to AIC from a quadratic model? library(mgcv)

Re: [R] matrix in data.frame

2007-05-30 Thread Lina Hultin-Rosenberg
Thank you so much for your help, it worked of course! Best regards, Lina Hultin-Rosenberg -Ursprungligt meddelande- Från: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Skickat: den 30 maj 2007 12:44 Till: Lina Hultin-Rosenberg Kopia: r-help@stat.math.ethz.ch Ämne: Re: [R] matrix in

Re: [R] search path question

2007-05-30 Thread Prof Brian Ripley
I meant essentially the same thing but returning file(fixed_up_name). You can vectorize this BTW: search_file - function(name, path=getOption(scanpath)) { fp - c(name, file.path(path, name)) # better to use direct name first fp - fp[file.exists(fp)] if(length(fp)) file(fp[1]) else

Re: [R] How to analyse simple study: Placebo-controlled (2 groups) repeated measurements (ANOVA, ANCOA???)

2007-05-30 Thread Karl Knoblick
Dear Frank Harrell, many thanks for your answers!!! I have downloaded your Harrell_notes.pdf and I think it would be best to have a look in some books you mentioned in the bibliographie. Can you recommend one especially? TO ANYBODY: Has anybody examples for similar data sets (as below) with R

[R] missing values

2007-05-30 Thread Allan Clark
hello all i would like to perform multiple imputation using the norm library. but i seem to get the following error when i use the da.norm function. Error in as.double.default(list(V1 = c(0.058177827, 0.123076923, 0.138713745, : (list) object cannot be coerced to 'double' can

[R] test to compare significant correlation increase

2007-05-30 Thread David Riano
Hi! I am calculating correlation between two variables: 1. X versus Y 2. X versus Y(with a 3 steps lag) I would like to test if the correlation increase/decrease from 1 to 2 is significant or not. Is there any function in R to do this? any hints? Thanks for help :) David Riaño Center for

Re: [R] white test to check homoscedasticity of the residuals

2007-05-30 Thread Achim Zeileis
On Wed, 30 May 2007, Benoit Chemineau wrote: Hi R-programmers, I can't find find the White test to check the homoscedasticity of the residuals from a linear model. Could you please help me with this? The package lmtest includes the function bptest() for performing Breusch-Pagan tests.

[R] Smoothing a path in 2D

2007-05-30 Thread Dieter Vanderelst
Hello, I'm currently trying to find a method to interpolate or smooth data that represent a trajectory in space. For example, I have an ordered (=time) set of (x,y) tuples which constitute a path in a 2D space. Is there a way using R to interpolate between these points in a way similar to

Re: [R] Smoothing a path in 2D

2007-05-30 Thread roger koenker
You might have a look at the fda package of Ramsay on CRAN. url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL

[R] codamenu() :Error in coda.options....

2007-05-30 Thread Luwis Diya
Dear all, I recently started having some problemd with the coda package. I have also deleted it and then installed the package again. The problem is that I cant access the codamenu. That is ;

[R] [R-pkgs] Revised Rcmdr.HH package

2007-05-30 Thread Richard M. Heiberger
I posted a revised Rcmdr.HH_1.8-0 package on CRAN. The Rcmdr.HH package adds additional menu items to the Rcmdr package by John Fox. Our introductory course at Temple University includes several topics that were not addressed in the Rcmdr. This revision uses the new RcmdrPlugin technology that

Re: [R] missing values

2007-05-30 Thread Prof Brian Ripley
When it says 'matrix' it means it, not 'data frame'. On Wed, 30 May 2007, Allan Clark wrote: hello all i would like to perform multiple imputation using the norm library. but i seem to get the following error when i use the da.norm function. Error in as.double.default(list(V1 =

Re: [R] Smoothing a path in 2D

2007-05-30 Thread Clint Bowman
?KalmanLike Clint BowmanINTERNET: [EMAIL PROTECTED] Air Dispersion Modeler INTERNET: [EMAIL PROTECTED] Air Quality Program VOICE: (360) 407-6815 Department of Ecology FAX:(360) 407-7534 USPS: PO

[R] separate y-limits in xYplot panels

2007-05-30 Thread Nitin Jain
Hello, I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. When using 'relation=free', it does not make the scales 'free', however when using 'relation=sliced', I get a warning Explicitly specified limits ignored

Re: [R] How to check for existence url from within a function?

2007-05-30 Thread Martin Maechler
Duncan == Duncan Murdoch [EMAIL PROTECTED] on Sat, 26 May 2007 08:02:11 -0400 writes: Duncan On 26/05/2007 7:13 AM, Heinz Tuechler wrote: Dear All, To check if an url exists, I can use try(). This works, as I expected, if I do it directly, as in the first part of

Re: [R] http proxies: setting and unsetting

2007-05-30 Thread Gabor Grothendieck
There is also a free program setenv.exe which is more powerful than setx.exe. You mentioned that deleting http_proxy from your environment through the OS would fix your problem. setenv.exe can both set and delete environment variables and you can specify user, system, etc. See description and

Re: [R] http proxies: setting and unsetting

2007-05-30 Thread matt.pettis
Thanks... I'll check the documentation to see which file on Windows I need to alter to issue one of those commands. matt -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 12:39 AM To: Gabor Grothendieck Cc: Pettis, Matthew (Thomson);

Re: [R] separate y-limits in xYplot panels

2007-05-30 Thread Sundar Dorai-Raj
Nitin Jain said the following on 5/30/2007 8:12 AM: Hello, I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. When using 'relation=free', it does not make the scales 'free', however when using

Re: [R] http proxies: setting and unsetting

2007-05-30 Thread matt.pettis
Thanks... I'll give it a whirl... matt -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 10:22 AM To: Pettis, Matthew (Thomson) Cc: r-help@stat.math.ethz.ch Subject: Re: [R] http proxies: setting and unsetting There is also a free

Re: [R] learning lattice graphics

2007-05-30 Thread Tyler Smith
On 2007-05-27, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: I would also suggest Paul Murrell's book R Graphics. http://www.amazon.com/Graphics-Computer-Science-Data-Analysis/dp/158488486X/ --sundar Thanks all! I have the relevant chapters from the Murrell book now (which were available as

[R] manova permutations and pair-wise contrasts

2007-05-30 Thread Tyler Smith
Hi, I have a function for doing permutation tests for Manovas, written with the help of folks here on the list. It seems to work ok, and I've found that there is indeed a significant difference among groups in my analysis. I want to follow up on this by testing for which pairs of groups are

Re: [R] separate y-limits in xYplot panels

2007-05-30 Thread Gabor Grothendieck
You could consider doing this directly with lattice. See: demo(intervals) On 5/30/07, Nitin Jain [EMAIL PROTECTED] wrote: Hello, I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. When using

Re: [R] codamenu() :Error in coda.options....

2007-05-30 Thread Uwe Ligges
Please report bugs in packages to the package maintainer (CCing) including version information and platform such as for me in this case: Same for me, R-2.5.0, Windows XP, coda 0.11-1. Uwe Ligges Luwis Diya wrote: Dear all, I recently started having some problemd with the coda package. I

Re: [R] test to compare significant correlation increase

2007-05-30 Thread Mike Lawrence
Just a guess (please correct if I'm way off on this), but maybe you could look at the difference in r betwen 1 2 and see if the confidence interval (http://davidmlane.com/hyperstat/B8544.html) for this value given your sample size includes 0. On 30-May-07, at 11:24 AM, David Riano wrote:

Re: [R] separate y-limits in xYplot panels

2007-05-30 Thread Nitin Jain
Thanks Sundar and Gabor for your prompt help. Sundar - Even after changing the line to scales = list(y = list(relation = free)), I do not get the free scales in my test code (below), and relation =sliced still gives warning. Gabor - I'll try using code as demo(intervals) suggests. Best, Nitin

Re: [R] test to compare significant correlation increase

2007-05-30 Thread Jonathan Baron
In response to the original message, see http://finzi.psych.upenn.edu/R/Rhelp02a/archive/85753.html which describes two papers about comparing dependent correlations, which I think is a relevant question. (Try Google too. I didn't.) There is also a paper by Steiger in Psychological Bulletin,

[R] Empirical Complementary CDF

2007-05-30 Thread Shiazy Fuzzy
Hi all, I'd like to plot an empirical LLCD (log-log-CCDF, where CCDF == 1-CDF). It seems ecdf() and plot(ecdf()) can't do it. I'd like to reuse some graphics features of ECDF plot. The fastest way I've found is to copypaste the ecdf code and writing this function: --- [R-code] --- eccdf -

[R] checking for viability of a GUI component

2007-05-30 Thread Hao Liu
Dear All: The question: How do I check for existance of the GUI, instead of checking the variable of the GUI? I created a log window for several applications, they will check for the existance of log window, if it exists, append output to it, otherwise, create log window and insert to it.

[R] Connecting to PostgreSQL/PostGIS from R (rgdal?)

2007-05-30 Thread Mike Leahy
Hello, I've been trying every now and then to find a cross operating system solution that would let me access PostgreSQL (and PostGIS) from R, or to access R from PostgreSQL. I know of pl/r, which accomplishes the latter, but has yet to be successfully ported to Windows. Similarly, I've tried

[R] riv-package, how to deal with missing values?

2007-05-30 Thread Jan Störger
Hello everyone! I want to calculate an instrumental variable estimator using the riv-package: riv(Y,Xex,Xend,W,method=classical) and my problem is that I either get an error because missing values are not allowed in the matrices or when I exclude NA's from the matrices it says that matrices

[R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread Tim Howard
dear all - I currently use Tinn-R as my text editor to work with code that I submit to R, with some output dumped to text files, some images dumped to pdf. (system: Windows 2K and XP, R 2.4.1 and R 2.5). We are using R for overnight runs to create large output data files for GIS, but then I

Re: [R] [R-sig-Geo] Connecting to PostgreSQL/PostGIS from R (rgdal?)

2007-05-30 Thread Roger Bivand
On Wed, 30 May 2007, Mike Leahy wrote: Hello, I've been trying every now and then to find a cross operating system solution that would let me access PostgreSQL (and PostGIS) from R, or to access R from PostgreSQL. I know of pl/r, which accomplishes the latter, but has yet to be

Re: [R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread michael watson \(IAH-C\)
Have you tried R2HTML, or is HTML not what you're looking for? -Original Message- From: [EMAIL PROTECTED] on behalf of Tim Howard Sent: Wed 30/05/2007 9:43 PM To: r-help@stat.math.ethz.ch Subject: [R] opinions please: text editors and reporting/Sweave? dear all - I currently use

Re: [R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread Greg Snow
Tim, First, I personnally am a big fan of LaTeX, Emacs, and ESS and I think that in the long run you would benefit from learning all of them (probably start with Emacs, then ESS, then LaTeX once you already have a knowledge of Emacs and how it can help). Since you asked about the simplest way to

Re: [R] [R-sig-Geo] Connecting to PostgreSQL/PostGIS from R (rgdal?)

2007-05-30 Thread Tim Keitt
I would also recommend you take a look at RODBC for general purpose database access. My impression is that it has received a lot more maintenance attention lately. I can't comment on the windows gdal binaries as I'm not too familiar with that platform. THK On 5/30/07, Mike Leahy [EMAIL

Re: [R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread Mike Lawrence
One minor warning regarding LaTeX: I have encountered journals in the psychological field (specifically, journals of the psychonomic society) that refuse to accept articles prepared in LaTeX, even if they are submitted as PDF. I'm a big LaTeX fan myself, so I really can't comprehend this.

[R] determining a parent function name

2007-05-30 Thread Sundar Dorai-Raj
Hi, All, I'm writing a wrapper for stop that produces a popup window using tcltk. Something like: error - function(...) { msg - paste(..., sep = ) if(!length(msg)) msg - if(require(tcltk, quiet = TRUE)) { tt - tktoplevel() tkwm.title(tt, Error) tkmsg - tktext(tt, bg =

[R] runif with weights

2007-05-30 Thread João Fadista
Dear all, I would like to generate 25 numbers from 1 to 100 but I would like to have some numbers that could be more probable to come out. I was thinking of the function runif: runif(25, 1, 100) , but I don´t know how to give more weight to some numbers. Example: each number from 2 to 10

[R] runif with weights

2007-05-30 Thread Ken Knoblauch
Not sure why you have set the probability of a 1 to 0 but maybe something like this might be what you want: round( ifelse( rbinom(25, 1, 0.4), runif(25, 2, 10), runif(25, 11, 100) ) ) [1] 2 6 34 90 79 71 83 8 47 36 21 32 17 71 3 16 9 65 94 6 30 5 7 10 13 I would like to

Re: [R] runif with weights

2007-05-30 Thread Bert Gunter
You did not explicitly say it, but your example indicates that you want to sample from integers only (else what would weights mean?). So... ?sample -- in particular note the prob argument and read help docs carefully e.g. sample(100,25,prob=c(0,rep.int(.4,9),rep.int(.6,90))) ## without

[R] sizing and saving graphics in R

2007-05-30 Thread Felicity Jones
Dear R wizards, I am seeking advice on graphics in R. Specifically, how to manipulate the size and save a plot I have produced using the LDheatmap library. I confess I am relatively new to graphics in R, but I would greatly appreciate any suggestions you may have. LDheatmap produces a

Re: [R] sizing and saving graphics in R

2007-05-30 Thread Murray Pung
I use the savePlot function for saving graphics. The following will save the active graphics panel in your working directory, in format wmf, which I find has a high resolution. Check out other possible formats in help. savePlot(filename = myfilename,type = c(wmf)) Murray On 31/05/07, Felicity

[R] cox goodness of fit

2007-05-30 Thread Murray Pung
Is there an implementation of the Cox-Snell residuals / Nelson-Aalen plot for goodness of fit? Or otherwise is there an appropriate Goodness of Fit diagnostic? Thanks Murray -- Murray Pung Statistician, Datapharm Australia Pty Ltd 0404 273 283 [[alternative HTML version deleted]]

[R] how to preserve trained model in LDA?

2007-05-30 Thread Feng Qiu
Hi all: I'm developing an application in which I use standard data to train the model in LDA and use the trained model to predict on test data. I can't train the model every time when I do prediction. So I need to save the trained model onto disk after the first training. Does

Re: [R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread Duncan Murdoch
Tim Howard wrote: dear all - I currently use Tinn-R as my text editor to work with code that I submit to R, with some output dumped to text files, some images dumped to pdf. (system: Windows 2K and XP, R 2.4.1 and R 2.5). We are using R for overnight runs to create large output data

Re: [R] opinions please: text editors and reporting/Sweave?

2007-05-30 Thread Jared O'Connell
Winshell (http://www.winshell.de/) is another (free) option if you want a Windows editor with good MikTEX integration. On 5/31/07, Duncan Murdoch [EMAIL PROTECTED] wrote: Tim Howard wrote: dear all - I currently use Tinn-R as my text editor to work with code that I submit to R, with some

Re: [R] Generating Data using Formulas

2007-05-30 Thread Charles C. Berry
Christian, The formula language is not suited to such recursive useage AFAICS. You can _vectorize_ your code like this: cmat - outer( 1:25, 1:25, function(y,x) ifelse( xy, 0, 0.8^(y-x) ) ) res - replicate(1000,{ y - 1 + cmat %*% rnorm(25) coef(lm(y[-1]~y[-25]))

Re: [R] Factor function: odd behavior when labels argument containsduplicates?

2007-05-30 Thread Bill.Venables
There is a difference between levels and labels. I think this is what you want. x - factor(rep(0:5, 2)) x [1] 0 1 2 3 4 5 0 1 2 3 4 5 Levels: 0 1 2 3 4 5 levels(x) - c(1,1:5) x [1] 1 1 2 3 4 5 1 1 2 3 4 5 Levels: 1 2 3 4 5 table(x) x 1 2 3 4 5 4 2 2 2 2 Bill Venables CSIRO

Re: [R] lattice: aligning independent graphs

2007-05-30 Thread Sebastian P. Luque
On Sun, 27 May 2007 15:09:43 -0700, Deepayan Sarkar [EMAIL PROTECTED] wrote: [...] Better in what sense? You are trying to use lattice to do something that lattice isn't designed to do, so there is no solution that is clean in a philosophical sense. Ideally, you want something like grid, that