[R] Mailing list attachments

2007-01-16 Thread Martin Maechler
PhGr == Philippe Grosjean [EMAIL PROTECTED] on Mon, 15 Jan 2007 18:56:00 +0100 writes: PhGr PhGr I will attach it to a second email send privately to PhGr you, since the mailing list do not accept attachments. That's not correct. http://www.r-project.org/mail.html

Re: [R] R graphics with Linux (libpng)

2007-01-16 Thread Rebecca Tagett
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Thu, 11 Jan 2007, Rebecca Tagett wrote: Hello, I'm trying to adapt some R code that works on Windows so that it will work on a Linux machine. The command : png(myFile.png, width=600, height=600) fails claiming that it

Re: [R] feedback on writing r extensions

2007-01-16 Thread Martin Maechler
Scott == Scott Harrison [EMAIL PROTECTED] on Mon, 15 Jan 2007 13:15:09 -0500 writes: Scott Hi, To whom should I send feedback/edits concerning Scott the Writing R Extensions web page? Scott http://cran.r-project.org/doc/manuals/R-exts.html To R-devel (the mailing list),

Re: [R] nonlinear regression: nls, gnls, gnm, other?

2007-01-16 Thread Turner, Heather
Hi Johann, The current version of gnm is unable to fit this type of model, though a new version with more flexibility is soon to be released. In any case, you probably want to use nls or gnls, depending on the assumptions that can be made about the model errors. For nls it is usual to assume

[R] Help with labeling a page with multiple graphs.

2007-01-16 Thread Rob Keller
Hi, I am trying to output pdf files with 8 graphs per page. My current study has 8 evaluation criteria, and 38 study conditions. This would result in 38 pages of 8 graphs. I have figured out how to get the graphs looking like I would like them, and I am using the layout() function to put them

[R] Gaussian glm for grouped data with unequal variances

2007-01-16 Thread Dawn Ashcourt
Hello - I am fairly new to R, (i.e., ability to create functions/write programs insignificant) and was wondering if there might be a convenient way to model the following: I want to fit a gaussian glm to grouped data, while allowing for unequal variances in each of the groups. More specifically,

Re: [R] How to format R code in LaTex documents

2007-01-16 Thread John C Frain
I often produce program listings in my LaTeX documents. I use the verbatim environment but use commands such as \addtolength{\oddsidemargin}{-0.95in} \addtolength{\evensidemargin}{-0.95in} to widen the printed page so that I do not have to resort to line continuation characters. This method

Re: [R] nonlinear regression: nls, gnls, gnm, other?

2007-01-16 Thread Prof Brian Ripley
On Tue, 16 Jan 2007, Turner, Heather wrote: Hi Johann, The current version of gnm is unable to fit this type of model, though a new version with more flexibility is soon to be released. In any case, you probably want to use nls or gnls, depending on the assumptions that can be made about

Re: [R] Help with labeling a page with multiple graphs.

2007-01-16 Thread Chuck Cleland
Rob Keller wrote: Hi, I am trying to output pdf files with 8 graphs per page. My current study has 8 evaluation criteria, and 38 study conditions. This would result in 38 pages of 8 graphs. I have figured out how to get the graphs looking like I would like them, and I am using the

[R] [[ gotcha

2007-01-16 Thread Robin Hankin
The following gotcha caught me off-guard just now. I have two matrices, a and b: a - matrix(1,3,3) b - matrix(1,1,1) (note that both a and b are matrices). I want them in a list: B - NULL B[[1]] - a B[[2]] - b B [[1]] [,1] [,2] [,3] [1,]111 [2,]111 [3,]

[R] Request regarding cluster package

2007-01-16 Thread Bhanu Kalyan.K
Dear Mr. Bengtsson, I see that there is a package exclusively for clustering data, named as Cluster Package in R library. It has some clustering algorithms implemented. Can you tell me how to implement the CLARA and PAM functions from that package for my data? Bhanu Kalyan K B.Tech Final

Re: [R] Fast Removing Duplicates from Every Column

2007-01-16 Thread Petr Pikal
Hi I have no idea how Test data look like. However help pages of functions data.frame() as.data.frame() str() and maybe few others can help you find how to change objects to data frames. HTH Petr On 16 Jan 2007 at 10:36, Bert Jacobs wrote: From: Bert Jacobs [EMAIL

Re: [R] [[ gotcha

2007-01-16 Thread Barry Rowlingson
Robin Hankin wrote: The error is given because after B[[1]] - a, the variable B is just a scalar and not a matrix (why is this?) Because [[i]] indexes more general vectors, and if you do B[[1]] when B is NULL, R doesnt know if you want B to be a list or a simple vector. If you

Re: [R] [[ gotcha

2007-01-16 Thread Petr Pikal
Hi try different way of list definition, see below. On 16 Jan 2007 at 10:10, Robin Hankin wrote: From: Robin Hankin [EMAIL PROTECTED] Date sent: Tue, 16 Jan 2007 10:10:42 + To: RHelp help r-help@stat.math.ethz.ch Subject:[R]

Re: [R] [[ gotcha

2007-01-16 Thread Henrik Bengtsson
To create a empty list do: B - list() /H On 1/16/07, Robin Hankin [EMAIL PROTECTED] wrote: The following gotcha caught me off-guard just now. I have two matrices, a and b: a - matrix(1,3,3) b - matrix(1,1,1) (note that both a and b are matrices). I want them in a list: B -

Re: [R] [[ gotcha

2007-01-16 Thread Joerg van den Hoff
Robin Hankin wrote: The following gotcha caught me off-guard just now. I have two matrices, a and b: a - matrix(1,3,3) b - matrix(1,1,1) (note that both a and b are matrices). I want them in a list: B - NULL B[[1]] - a B[[2]] - b B [[1]] [,1] [,2] [,3] [1,]

Re: [R] [[ gotcha

2007-01-16 Thread Prof Brian Ripley
On Tue, 16 Jan 2007, Robin Hankin wrote: The following gotcha caught me off-guard just now. Checking the relevant help page is always a good idea (and that is why the posting guide asks that you do so before posting). I have two matrices, a and b: a - matrix(1,3,3) b - matrix(1,1,1)

Re: [R] Request regarding cluster package

2007-01-16 Thread Uwe Ligges
Bhanu Kalyan.K wrote: Dear Mr. Bengtsson, I see that there is a package exclusively for clustering data, named as Cluster Package in R library. It has some clustering algorithms implemented. Can you tell me how to implement the CLARA and PAM functions from that package for my data?

Re: [R] Gaussian glm for grouped data with unequal variances

2007-01-16 Thread Chuck Cleland
Dawn Ashcourt wrote: Hello - I am fairly new to R, (i.e., ability to create functions/write programs insignificant) and was wondering if there might be a convenient way to model the following: I want to fit a gaussian glm to grouped data, while allowing for unequal variances in each of the

Re: [R] Gaussian glm for grouped data with unequal variances

2007-01-16 Thread Thilo Kellermann
Hi, I would suggest to use lme for doing that: library(nlme) vf1Ident - varIdent( c(m = 0.5), form = ~ 1 | group ) fm.lme - lme(data ~ group, weights = vf1Ident. data = DATA) anova(fm.lme) Hope this helps, Thilo On Tuesday 16 January 2007 10:30, Dawn Ashcourt wrote: Hello - I am fairly new to

[R] SARIMA problem

2007-01-16 Thread yannig goude
Hi, I have a problem with the ARIMA function, occuring when I set the parameter per (the period of SARIMA model) to a high value (see the exemple bellow). It seems that when per is high it takes a too large amount of memory to calculate the model and I have a memory storage error. But I

Re: [R] SARIMA problem

2007-01-16 Thread Prof Brian Ripley
On Tue, 16 Jan 2007, yannig goude wrote: Hi, I have a problem with the ARIMA function, occuring when I set the parameter per (the period of SARIMA model) to a high value (see the exemple bellow). It seems that when per is high it takes a too large amount of memory to calculate the model

[R] nlme : convergence problem and other errors

2007-01-16 Thread Thomas BRUNEL
Dear R-user, I am trying to use the R nlme function to fit a non linear mixed effects model. The model I wand to fit is an individual somatic growth model with 4 parameters. For all parameters both fixed and random effects have to be estimated, as well as their covariance matrix (see the

[R] number of Nodes in Random Forest

2007-01-16 Thread Gonçalo Carrera
I'm calculating nodes using Random Forest in R but i only get nodes for a fraction of the compounds i want to calculate, the rest is ommited and is not printed in the output file, (i'm working with 3012 compounds). What can i do to have nodes printed for all the compounds. Thanks Gonçalo

[R] problems with for loop

2007-01-16 Thread Jorge Lampurlanes Castel
Hello, With this program I try to repeat analysis for different years. The results of the analysis are not printed when in the loop, except for the year sequence. What is wrong? Thanks a lot. for (i in 92:99){ cat(\n,

Re: [R] problems with for loop

2007-01-16 Thread Michael T. Mader
If you really want the summary() etc to print to STDOUT use cat() or print(). However other ways to post-process results may be preferrable, I think about Sweave, xtable, etc. Regards Michael Jorge Lampurlanes Castel wrote: Hello, With this program I try to repeat analysis for different

[R] R on Windows Vista

2007-01-16 Thread Sicotte, Hugues Ph.D.
Did anyone try to run R under Window Vista, especially Windows Vista 64bit? 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 and

[R] Re : problems with for loop

2007-01-16 Thread justin bem
Hi, Use print function print(Anova(...)) How about use of lappy functions ? It can be much easier foo-function(data,formula){ LM - lm(formula,data=data) Result-list(LmSum-summary(LM), Type2-Anova(LM, type=II)),Type3-Anova(LM, type=III)) } and

Re: [R] R on Windows Vista

2007-01-16 Thread Duncan Murdoch
On 1/16/2007 9:35 AM, Sicotte, Hugues Ph.D. wrote: Did anyone try to run R under Window Vista, especially Windows Vista 64bit? I know someone who has (but I don't know if it was 32 bit or 64 bit). He had a little trouble installing, because Vista tightens security slightly: you need to run

Re: [R] problems with for loop

2007-01-16 Thread Chuck Cleland
Jorge Lampurlanes Castel wrote: Hello, With this program I try to repeat analysis for different years. The results of the analysis are not printed when in the loop, except for the year sequence. What is wrong? Thanks a lot. for (i in 92:99){ cat(\n,

Re: [R] feedback on writing r extensions

2007-01-16 Thread David Forrest
On Tue, 16 Jan 2007, Martin Maechler wrote: Scott == Scott Harrison [EMAIL PROTECTED] on Mon, 15 Jan 2007 13:15:09 -0500 writes: ... For edits, we'd mostly like to receive feedback on the *source* of the above automatically produced document (which is also the source of the PDF version,

Re: [R] feedback on writing r extensions

2007-01-16 Thread Gabor Grothendieck
It would also be nice if there were links in the .Rd files back to the source of the commands, not just the source of the documentation. That would facilitate and encourage readers to paruse the source to clarify the meaning of the help files. On 1/16/07, David Forrest [EMAIL PROTECTED] wrote:

[R] parallel coordinates plot

2007-01-16 Thread Marco Helbich
Dear List, I want to make a parallel coordinates plot with the specific variables on the abscissa and the cases on the ordinate should be dyed dependent on another nominal variable from the data frame. I use the parcoord function. Thanks for your help! Best regards, Marco

[R] plot portion of a line

2007-01-16 Thread BBands
Dear HelpeRs, Given: x - rnorm(50) y - rnorm(50) plot(x,y) abline(lm(x ~ y)) Is there a way to plot just a portion of the line? Say for values of x 2.0 or x -2.0 and x 4.0. (Still fitting all the points.) Thank you, jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance

Re: [R] plot portion of a line

2007-01-16 Thread Dimitris Rizopoulos
you could try something like the following: x - rnorm(50) y - rnorm(50) obj - lm(y ~ x) par(mfrow = c(2, 2)) plot(x, y, main = x -1) x. - c(min(x), -1) y. - predict(obj, data.frame(x = x.)) lines(x., y.) plot(x, y, main = x 1) x. - c(1, max(x)) y. - predict(obj, data.frame(x = x.)) lines(x.,

Re: [R] plot portion of a line

2007-01-16 Thread Gabor Grothendieck
Use segments. In the following we overlay the black abline with a wider red segments line segment: set.seed(1) x - rnorm(50) y - rnorm(50) plot(y ~ x) y.lm - lm(y ~ x) abline(y.lm) # omit this line if black abline not wanted x0 - c(-2, 4) y0 - predict(y.lm, list(x = x0)) segments(x0[1],

[R] system(mysql... Does not recognize as passing an attribute

2007-01-16 Thread Lapointe, Pierre
Hi, This is my command line request: mysql -u root -ppassword -D quant c:/cline.txt This line works from the command line in windows. In R, when I try to use the system function, it does not work, system(paste('mysql -u root -ppassword -D quant c:/cline.txt'),show.output.on.console = TRUE)

[R] system(mysql... Does not recognize as passing an attribute (No HTML)

2007-01-16 Thread Lapointe, Pierre
Hi, This is my command line request: mysql -u root -ppassword -D quant c:/cline.txt This line works from the command line in windows. In R, when I try to use the system function, it does not work, system(paste('mysql -u root -ppassword -D quant c:/cline.txt'),show.output.on.console = TRUE)

Re: [R] system(mysql... Does not recognize as passing an attribute

2007-01-16 Thread Prof Brian Ripley
You are on Windows, and that is how system() works on Windows (not just in R, but in C, Perl ...). The help says command: the system command to be invoked, as a string. A command line is not a 'system command', and the is interpreted by the shell you are running as your 'command line in

Re: [R] system(mysql... Does not recognize as passing an attribute (No HTML)

2007-01-16 Thread Henrique Dallazuanna
You can try this: system(paste('mysql -u hsdlife -p -D life ', file('c:/teste.txt')), show.output.on.console = TRUE) On 16/01/07, Lapointe, Pierre [EMAIL PROTECTED] wrote: Hi, This is my command line request: mysql -u root -ppassword -D quant c:/cline.txt This line works from the command

Re: [R] How to format R code in LaTex documents

2007-01-16 Thread Michael Dewey
At 14:12 15/01/2007, Frank E Harrell Jr wrote: Benjamin Dickgiesser wrote: Hi, I am planning on putting some R script in an appendix of a LaTex document. Can anyone recommend me a way of how to format it? Is there a way to keep all line breaks without having to insert \\ in every single line?

Re: [R] R on Windows Vista

2007-01-16 Thread Charles Annis, P.E.
I've run R on the 32 bit version of Vista. Because of Vista's extra security controls you can't install a library easily, however, even though I had not trouble installing R. You must first set the security level to allow it (I can't recall the details but it's not to difficult to figure out),

[R] nested hierarchical design

2007-01-16 Thread Jelmer Elzinga
Dear R-Helpers, I would like to know what syntax I need to use to do a nested anova for 1. a continuous variable and 2. count data (x out of y) 1. The first I used to do in SPSS and I would like to be able to do it in R as well. This is the hierarchical model I would like to use: a continuous

[R] (no subject)

2007-01-16 Thread Gonçalo Carrera
I'm calculating nodes using Random Forest in R but i only get nodes for a fraction of the compounds i want to calculate, the rest is ommited and is not printed in the output file, (i'm working with 3012 compounds). What can i do to have nodes printed for all the compounds. Thanks Gonçalo

[R] RODBC: sqlQuery is successful, but a similar sqlFetch returns error

2007-01-16 Thread Ben Fairbank
Greetings guRus -- I have successfully queried a large (24,445 rows by 281 cols.) in-house database using the following RODBC query (without the line breaks) testout - sqlQuery(channel, select idSchedule,EXCL_Total from dbo.vwC1198_2006_RawData_With_CMPL_EXCL) This returns a dataframe

Re: [R] R on Windows Vista

2007-01-16 Thread Uwe Ligges
Charles Annis, P.E. wrote: I've run R on the 32 bit version of Vista. Because of Vista's extra security controls you can't install a library You mean you can't install a *package* into a library. Are you sure that you cannot install into some other library that is in some directory where

Re: [R] plot portion of a line

2007-01-16 Thread Gabor Grothendieck
As in Dmitris' post lines is a somewhat more succint so here it is again replacing segments with lines: set.seed(1) x - rnorm(50) y - rnorm(50) plot(y ~ x) y.lm - lm(y ~ x) abline(y.lm) # omit this line if black abline not wanted x0 - c(-2, 4) y0 - predict(y.lm, list(x = x0)) lines(y0 ~

Re: [R] RODBC: sqlQuery is successful, but a similar sqlFetch returns error

2007-01-16 Thread Prof Brian Ripley
'.' is invalid in an SQL table name. I don't know what driver you are using (you seem very reluctant to tell us anything useful about your DBMS), but dbo.vwC1198_2006_RawData_With_CMPL_EXCL probably means table vwC1198_2006_RawData_With_CMPL_EXCL in database dbo, and that is valid as part of

Re: [R] number of Nodes in Random Forest

2007-01-16 Thread Weiwei Shi
Hi, Goncalo: did u use compounds as features when building rf? If so, some compounds are NOT randomly selected in splitting nodes, which might explain what you observed. But you need to provide more info for us to help you, like those parameters you used to build rf. You can use varImpPlot to

[R] LSD multiple comparison test

2007-01-16 Thread Jorge Lampurlanes Castel
Hello, There is any way of performing a LSD (Least Significant Diference) multiple comparison test to separate the levels of the significant factors of a model? I am migrating from SAS. Thanks a lot. -- ** Jorge Lampurlanés Castel Departament

Re: [R] LSD multiple comparison test

2007-01-16 Thread Richard M. Heiberger
Look at the glht function in the multcomp package and the MMC functions in the HH package. Rich __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Is it the PPS samples i needed in R?

2007-01-16 Thread Thomas Lumley
On Fri, 12 Jan 2007, zhijie zhang wrote: Dear friends, I want to do a unequal probability sampling, that is, Probability Proportionate to size, Is it right for the following programs? Say my original dataset is: ID Population 1 100 2 200 3 300 IF the population is large

Re: [R] feedback on writing r extensions

2007-01-16 Thread David Forrest
On Tue, 16 Jan 2007, Gabor Grothendieck wrote: It would also be nice if there were links in the .Rd files back to the source of the commands, not just the source of the documentation. That would facilitate and encourage readers to paruse the source to clarify the meaning of the help files.

[R] Rgui crashes when calling odbcClose()

2007-01-16 Thread Robert Sams
Hi, I'm running Rgui v2.4.0, RODBC v1.1-8, and psqlODBC v8.2.0002. Whenever I do the following chan - odbcConnect(mydatabase, uid=admin) # connection to a postgresql db on a linux box tmp - sqlQuery(chan, select * from sometable;) # this is successfull odbcClose(chan) # this crashes Rgui and

Re: [R] image() and nonsquare matrices

2007-01-16 Thread Greg Snow
Look at the squishplot function in the TeachingDemos package. Does this set of commands work for you? library(TeachingDemos) squishplot(c(0.5,20.5),c(0.5,5.5),1) image(1:20,1:5,a,asp=1,xlab=label here) box() -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] labels outliers in boxplot

2007-01-16 Thread Greg Snow
Some information on the outliers is returned from the boxplot function. Try something like: set.seed(123) tmp - data.frame( group=gl(3,10), y=rcauchy(30), sex=gl(2,5,30,c('M','F')) ) tmp2 - boxplot( split(tmp$y,tmp$group) ) identify( tmp2$group, tmp2$out, tmp2$group ) Or if your grouping

[R] Reminder: JSS Special volume R in ecology

2007-01-16 Thread Thomas Petzoldt
Dear UseRs, one of the outcomes of the useR! 2006 conference held in Vienna was that JSS, the Journal of Statistical Software, is planning to publish a series of special volumes. They will be guest edited and each volume will have 5-10 issues (articles) of the usual JSS format. One of the

Re: [R] Controlling size of boxplot when it is added in a plot

2007-01-16 Thread Greg Snow
One approach is to use the subplot function from the TeachingDemos package. I could only get everything to line up properly if I specified the xlim argument to hist directly and the same value as the ylim argument to boxplot. Try this: x - rnorm(100) library(TeachingDemos) hist(x, breaks =

[R] curious about dimension of 'apply' output when MARGIN=1

2007-01-16 Thread Benjamin Tyner
Reading the documentation for 'apply', I understand the following is working exactly as documented: M-matrix(1:6,ncol=2) M [,1] [,2] [1,]14 [2,]25 [3,]36 apply(M,2,function(column) column+c(1,2,3)) [,1] [,2] [1,]25 [2,]47 [3,]69

Re: [R] plot portion of a line

2007-01-16 Thread Greg Snow
Try the clipplot function from the TeachingDemos package: x - rnorm(50) y - rnorm(50) plot(x,y) clipplot( abline(lm(y~x), col='red'), xlim=c(1,3)) clipplot( abline(lm(y~x), col='blue'), xlim=c(-2,1)) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] curious about dimension of 'apply' output when MARGIN=1

2007-01-16 Thread Gabor Grothendieck
The reshape package has an idempotent apply, iapply: library(reshape) iapply(M,1,function(row) row+c(1,2)) [,1] [,2] [1,]26 [2,]37 [3,]48 On 1/16/07, Benjamin Tyner [EMAIL PROTECTED] wrote: Reading the documentation for 'apply', I understand the following is

[R] Help on variable ranking

2007-01-16 Thread Rupendra Chulyadyo
Hello all, I want to assign relative score to the predictor variables on the basis of its influence on the dependent variable. But I could not find any standard statistical approach appropriate for this purpose. Please suggest the possible approaches. Thanks in advance, Rupendra Chulyadyo

Re: [R] Help on variable ranking

2007-01-16 Thread Andrew Robinson
Rupendra, depending on the nature of your data (which you haven't mentioned), you might try hierarchical partitioning, as found in the hier.part package on CRAN. Cheers Andrew On Wed, Jan 17, 2007 at 11:07:18AM +0545, Rupendra Chulyadyo wrote: Hello all, I want to assign relative score to

Re: [R] Help on variable ranking

2007-01-16 Thread Simon Blomberg
Before you do that, you might try reading this paper: Bring, J. 1995. Variable importance by partitioning R^2. Quality and Quantity 29:173-189. Cheers, Simon. Andrew Robinson wrote: Rupendra, depending on the nature of your data (which you haven't mentioned), you might try hierarchical

[R] Re : labels outliers in boxplot

2007-01-16 Thread justin bem
I use to do this (It may help you) boxplot(x) bx-boxplot(x,plot=F) In bx object, you and object names out with yaxis cordinates. For the i-th boxplot in the figure, use text(rep(i,length(bx$out)),bx$out,...) Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295.