Re: [R] Journal Quality R Graphs?

2005-03-02 Thread Werner Wernersen
Thanks for your answer, Adai! Being a newbie, I finally tried a lot of things and wasted a stack of paper in order to get a black white printer printable chart of good quality. My experiences are the following: * do never (!) use the alpha correction color settings for transparency if the

Re: [R] Journal Quality R Graphs?

2005-03-02 Thread Werner Wernersen
Thanks for your answer, Adai! Being a newbie, I finally tried a lot of things and wasted a stack of paper in order to get a black white printer printable chart of good quality. My experiences are the following: * do never (!) use the alpha correction color settings for transparency if the

[R] barchart error (invalid line type) maybe caused by mangled data frame, fix() resolving the problem

2005-03-02 Thread Thomas
Hi, I use R [EMAIL PROTECTED] I ran into the following problem when using barchart() and would like to ask if there is a solution for it other than using fix(). My data is: class(b) [1] data.frame unclass(b) $uint [1] 84 42 71 82 80 123 13 1 15 77 61 56 62 27 100 87 110 191 71

Re: [R] constraining initial slope in smoother.spline

2005-03-02 Thread Simon Wood
Hello. I want to fit a smoother spline (or an equivalent local regression method) to a series of data in which the initial value of the 1st derivative (slope) is constrained to a specific value. Is it possible to do this? If so, how? - you should be able to modify the example in the help

[R] Using time series and lm

2005-03-02 Thread Matthieu Cornec
Hello, I apologize for this question that may has been asked a lot of times but I could not go through it. I create a multivariate time series containing NA values. (This dataset of time series can come directly from an imported file). I want to compute a linear regression and obtain a time

[R] Problems with the tseries package

2005-03-02 Thread MARTIN CALMARZA AGUSTIN
Dear Sirs, I am trying to perform a garch analysis to some data time series.Therefore, I've downloaded the package tseries, as the garch analysis is not available in the main R program.When I try to load the tseries package from the R-Console screen, the following message appears: local({pkg

Re: [R] return from nested function?

2005-03-02 Thread Jan T. Kim
On Tue, Mar 01, 2005 at 11:21:44PM -0800, Seth Falcon wrote: On Feb 25, 2005, at 12:34 PM, [EMAIL PROTECTED] wrote: Is is possible from within a function to cause its caller to return()? This snippet may be of interest: f = function(x) { + print(f) + g(return()) + print(end of f)

[R] subset selection for logistic regression

2005-03-02 Thread Wittner, Ben
R-packages leaps and subselect implement various methods of selecting best or good subsets of predictor variables for linear regression models, but they do not seem to be applicable to logistic regression models. Does anyone know of software for finding good subsets of predictor variables for

Re: [R] subset selection for logistic regression

2005-03-02 Thread Frank E Harrell Jr
Wittner, Ben wrote: R-packages leaps and subselect implement various methods of selecting best or good subsets of predictor variables for linear regression models, but they do not seem to be applicable to logistic regression models. Does anyone know of software for finding good subsets of

Re: [R] Anova with Scheffe Tests

2005-03-02 Thread Rogers, James A [PGRD Groton]
In good ol' Statview (now dearly departed) to complete a Scheffe test you selected the independent variables and dependent variable and it produced a table with the pairwise comparisons of the levels of the factor. I'm looking for a system that is as basic, but can be done using R and has

Re: [R] Problems with the tseries package

2005-03-02 Thread consentino
Hi, there is a package called quadprog in the CRAN page, under Windonws version in the page Index of /bin/windows/contrib/2.0 Fabrizio Consentino On Wed, 2 Mar 2005 12:02:23 +0100 MARTIN CALMARZA AGUSTIN [EMAIL PROTECTED] wrote: Dear Sirs, I am trying to perform a garch analysis to some data

[R] Differences between package and library terminology

2005-03-02 Thread Adaikalavan Ramasamy
Just out of curiosity, what is the difference between the terms for package and library ? Why are we loading a package with the library() command ? If this is a case of RTFM, I would be happy to do so if pointed in the right direction. I have searched the FAQ and mail archives and only came up

[R] orientation of eps files

2005-03-02 Thread Andrew Collier
hello, i have a problem with the orientation of eps files produced with the postscript() command. i have generated some eps files with R using: postscript(file = filename, horizontal = FALSE, paper = special, onefile = F ALSE, height = height, width = width, pointsize = pointsize) now, when i

RE: [R] Differences between package and library terminology

2005-03-02 Thread Dr Carbon
If you believe the fortunes package (or is it library) then your answer is contained therein: #59 Zhu Wang: I am trying to create a library which uses some Fortran source files [...] Douglas Bates: Someone named Martin Maechler will shortly be sending you email regarding the distinction between

RE: [R] subset selection for logistic regression

2005-03-02 Thread dr mike
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wittner, Ben Sent: 02 March 2005 11:33 To: [EMAIL PROTECTED] Subject: [R] subset selection for logistic regression R-packages leaps and subselect implement various methods of selecting best or

Re: [R] Differences between package and library terminology

2005-03-02 Thread Marc Schwartz
On Wed, 2005-03-02 at 13:42 +, Adaikalavan Ramasamy wrote: Just out of curiosity, what is the difference between the terms for package and library ? Why are we loading a package with the library() command ? If this is a case of RTFM, I would be happy to do so if pointed in the right

Re: [R] questions related to ploting in R

2005-03-02 Thread Adaikalavan Ramasamy
You have to decided whether you want one single plot or 23 plots (one for each chromosome). Since I suspect that, say, copy_num at the end of Chromosome 1 and the copy_num at the start of Chromosome 2 are not related (like time series data) and would suggest 23 plots instead. # simulate data #

Re: [R] Differences between package and library terminology

2005-03-02 Thread Dimitris Rizopoulos
look at this message http://tolstoy.newcastle.edu.au/R/devel/05/02/2148.html and the thread it comes from for more info. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium

Re: [R] orientation of eps files

2005-03-02 Thread Marc Schwartz
On Wed, 2005-03-02 at 15:44 +0200, Andrew Collier wrote: hello, i have a problem with the orientation of eps files produced with the postscript() command. i have generated some eps files with R using: postscript(file = filename, horizontal = FALSE, paper = special, onefile = F ALSE,

Re: [R] Differences between package and library terminology

2005-03-02 Thread Uwe Ligges
Adaikalavan Ramasamy wrote: Just out of curiosity, what is the difference between the terms for package and library ? Why are we loading a package with the library() command ? If this is a case of RTFM, I would be happy to do so if pointed in the right direction. I have searched the FAQ and mail

Re: [R] orientation of eps files

2005-03-02 Thread Roger D. Peng
This is ghostscript feature, I believe. See here: https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027759.html I usually do setenv GS_OPTIONS -dAutoRotatePages=/None in tcsh. -roger Andrew Collier wrote: hello, i have a problem with the orientation of eps files produced with the

Re: [R] Differences between package and library terminology

2005-03-02 Thread Adaikalavan Ramasamy
Thank you to Marc Schwartz, Dimitris Rizopoulos and Uwe Ligges. The discussions in R-devel thread was helpful. I think it is the usage library(package) that confuses new users to confuse the term packages with libraries. Thank you. Regards, Adai On Wed, 2005-03-02 at 08:20 -0600, Marc

Re: [R] return from nested function?

2005-03-02 Thread Seth Falcon
On Mar 2, 2005, at 4:13 AM, Jan T. Kim wrote: I may be dumb today, but doesn't that beg the question of how does g cause f not to return? No, I think my post doesn't really help you. In the context of a recursive function, the code I posted provides a way to jump out of the recursion which is a

Re: [R] barchart error (invalid line type) maybe caused by mangled data frame, fix() resolving the problem

2005-03-02 Thread Thomas
b$month - substring(bb$all$month, 3) b$year - substring(bb$all$month, 1, 2) Ah well, I have to make it a factor. Thank you. Regards, Thomas. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] subset selection for logistic regression

2005-03-02 Thread Frank E Harrell Jr
dr mike wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wittner, Ben Sent: 02 March 2005 11:33 To: [EMAIL PROTECTED] Subject: [R] subset selection for logistic regression R-packages leaps and subselect implement various methods of selecting

[R] Text in lattice Graphics outside plot area

2005-03-02 Thread Bock, Michael
I am trying to get the same text printed on each page of a multi-page series of bar charts. The text need to appear in the upper left-hand corner of the page, outside of the plot area. A watermark might be the closest analogy to what I am after This is what I have so far: PData -

RE: [R] subset selection for logistic regression

2005-03-02 Thread Berton Gunter
To clarify Frank's remark ... A prominent theme in statistical research over at least the last 25 years (with roots that go back 50 or more, probably) has been the superiority of shrinkage methods over variable selection. I also find it distressing that these ideas have apparently not penetrated

[R] Warning: number of items to replace is not a multiple of replacement length

2005-03-02 Thread Lyle W. Konigsberg
I feel like a complete dolt, as I know this question has been asked by others on a fairly regular basis, but I'm going in circles trying to get the following to work: id.prob-function (tt) { library(mvtnorm) # Makeham-function(tt) { a2=0.030386513 a3=0.006688287

Re: [R] Problems with the tseries package

2005-03-02 Thread Uwe Ligges
MARTIN CALMARZA AGUSTIN wrote: Dear Sirs, I am trying to perform a garch analysis to some data time series.Therefore, I've downloaded the package tseries, as the garch analysis is not available in the main R program.When I try to load the tseries package from the R-Console screen, the following

Re: [R] Two problems building a package

2005-03-02 Thread Uwe Ligges
Wollenberg, Kurt R wrote: Hello all: I have written a few R scripts and am trying to turn them into a package for submission to CRAN. All of these scripts are R code only, no C or C++ or anything else. I'm working with R 2.0.1 running on a Windows XP machine. So far running rcmd install --build

Re: [R] Leaps regsubsets

2005-03-02 Thread Spencer Graves
I can't help you answer your specific question, but after you figure it out, would you please rerun the analysis, say, 1,000 times after randomly permuting your response variable each time (or bootstrap sampling therefrom). I would be interested in your comparison of your actual results

Re: [R] Text in lattice Graphics outside plot area

2005-03-02 Thread Deepayan Sarkar
On Wednesday 02 March 2005 09:29, Bock, Michael wrote: I am trying to get the same text printed on each page of a multi-page series of bar charts. The text need to appear in the upper left-hand corner of the page, outside of the plot area. A watermark might be the closest analogy to what I am

Re: [R] orientation of eps files

2005-03-02 Thread Prof Brian Ripley
Yes, and it happens because by default R's plots have rotated text on the y axis, and it is this that tends to trigger auto-rotation. The answer is in https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027766.html various other items in the thread being off the point. On Wed, 2 Mar

Re: [R] Warning: number of items to replace is not a multiple of replacement length

2005-03-02 Thread Uwe Ligges
Lyle W. Konigsberg wrote: I feel like a complete dolt, as I know this question has been asked by others on a fairly regular basis, but I'm going in circles trying to get the following to work: id.prob-function (tt) { library(mvtnorm) # Makeham-function(tt) {

RE: [R] subset selection for logistic regression

2005-03-02 Thread Christian Hennig
Perhaps I should not write it because I will discredit myself with this but... Suppose I have a setup with 100 variables and some 1000 cases and I want to boil down the number of variables to a maximum of 10 for practical reasons even if I lose 10% prediction quality by this (for example because

[R] Applying a function to all combinations of factors

2005-03-02 Thread Marc Belisle
Is there a way to apply a function, say cor(), to each combination of some number of variables, and this, without using loops? For example, I have day, hour, var1 and var2. How could I compute cor(var1,var2) for each day*hour combination and obtain a matrix with day, hour and the cor value for

[R] R/S course in New York city***April, 2005

2005-03-02 Thread sue
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce 2-day R/S-plus Fundamentals and Programming Techniques in New York: www.xlsolutions-corp.com/training.htm New York, NY April 14th -15th, 2005 Reserve your seat now at the early bird

[R] data.frame, data types, and apply

2005-03-02 Thread Vincent Detours
Dear all, Here is an issue I often stumble on. 1- colunm types in data.frames. --- d - data.frame(x=as.character(c(a, b, c)), y=as.numeric(c(1, 2, 3))) d x y 1 a 1 2 b 2 3 c 3 is.numeric(d[1,2]) [1] TRUE is.numeric(d[1,1]) [1] FALSE apply(d, c(1,2),

Re: [R] orientation of eps files

2005-03-02 Thread Arne Henningsen
I also had problems with the rotation of eps files in LaTeX presentations. Now, I produce eps files in R with postscript( ), 'distill' it with ps2eps, make a pdf with epstopdf, include it in my LaTeX file with \pgfimage{ }, use LaTeX class beamer (http://latex-beamer.sourceforge.net) and compile

Re: [R] orientation of eps files

2005-03-02 Thread Marc Schwartz
On Wed, 2005-03-02 at 17:02 +, Prof Brian Ripley wrote: Yes, and it happens because by default R's plots have rotated text on the y axis, and it is this that tends to trigger auto-rotation. The answer is in https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027766.html

[R] .ps and .pdf page size differences in FC vs. Debian

2005-03-02 Thread Clint Harshaw
R version: 2.0.0 OS: Fedora Core 1 When I'm using Fedora Core 1, Rplots.ps (and subsequent Rplots.pdf created after using ps2pdf Rplots.ps) which are created from the command line execution of R are too large to fit on a US Letter sized page when printed. The same code will produce a US letter

Re: [R] data.frame, data types, and apply

2005-03-02 Thread Uwe Ligges
Vincent Detours wrote: Dear all, Here is an issue I often stumble on. 1- colunm types in data.frames. --- d - data.frame(x=as.character(c(a, b, c)), y=as.numeric(c(1, 2, 3))) d x y 1 a 1 2 b 2 3 c 3 is.numeric(d[1,2]) [1] TRUE is.numeric(d[1,1]) [1] FALSE apply(d,

[R] OT: Looking for freely available medical data

2005-03-02 Thread Rusty Shackleford
I'm a computer science graduate student studying machine learning and rule-based induction. I'd like to explore if it is possible to predict future disease rates based on medical data. However, medical claims data like this is usually only collected by insurance companies who aren't going to

Re: [R] .ps and .pdf page size differences in FC vs. Debian

2005-03-02 Thread Clint Harshaw
Clint Harshaw wrote: R version: 2.0.0 OS: Fedora Core 1 [...] How do I set (in Fedora Core 1) the paper size for R to US letter, so I can run my commands R baseballsalary.R output --vanilla -q from the terminal? About 15 minutes after I sent this question in to the list, I found some help

Re: [R] .ps and .pdf page size differences in FC vs. Debian

2005-03-02 Thread Prof Brian Ripley
This *is* in the R-admin manual that the INSTALL file asks you to read, and also in configure --help. There is even an loud hint for `North American readers'. If you have not read that, you need to. At this stage, go to R_HOME/etc/Renviron and change the default for R_PAPERSIZE to one of the

[R] Rounding parameter values in genoud(), Rgenoud package

2005-03-02 Thread Waichler, Scott R
I would like to limit the significant figures of the calibrated parameters determined by genoud() in the Rgenoud package. Below is some example output, where column 1 is model run number, columns 2-7 are the parameter values, and columns 8-12 are model fit statistics. I would like genoud to

Re: [R] Applying a function to all combinations of factors

2005-03-02 Thread jeaneid
you could use something like by(data, list(data1$day, data1$hour), function(x) cor(x[,var1], x[, var2])) This will return a list and then you can unlist and turn to matrix HTH Is there a way to apply a function, say cor(), to each combination of some number of variables, and this, without

[R] wilcox.test statistics

2005-03-02 Thread Liu Ting-Yuan
Hi, Could anyone provide the formula of the statistics which the wilcox.test used for the two-sample rank-sum test? I got some statistics of 0 values, but it is impossible to have 0 rank-sum. Does the function use the Mann-Whitney U test statistics? Thanks. Ting-Yuan Liu

RE: [R] wilcox.test statistics

2005-03-02 Thread Berton Gunter
R is open source, so you can read the code yourself! stats:::wilcox.test.default -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From:

[R] overlapping/interleaved histogram help

2005-03-02 Thread Brian Hook
NOTE: I have read the FAQ, Verzani's book, Rtips, and googled. For various reasons I don't want to use a density plot when comparing two distributions, I would prefer to have interleaved histograms over the same ranges. In addition to this, I would also like to normalize the two histograms so

[R] Using varPower in gnls, an answer of sorts.

2005-03-02 Thread Setzer . Woodrow
Back on January 16, a message on R-help from Ravi Varadhan described a problem with gnls using weights=varPower(). The problem was that the fit failed with error Error in eval(expr, envir, enclos) : Object . not found I can reliably get this error in version 2.0.1-patched 2004-12-09 on Windows

[R] Suppressing observation numbers

2005-03-02 Thread Nam-Ky Nguyen
Dear R gurus, Below is a part of the R output. Please consider the two lines: data model.matrix(m1) Is there a way of suppressing the observation numbers 1, 2, ...27 in the output (I don't want these number to appear in the output)? Regards, NKN # Orthogonal blocking

[R] apply a function to a rolling subset of a vector

2005-03-02 Thread Whit Armstrong
Does anyone know an easy way to calculate the rolling 20 period average or sum of a vector? For instance: x - rnorm(1000) y - apply.subset(x,20,fun=sum) The first element of y would contain the sum of elements 1 to 20, the second element of y would contain the sum of elements 2:21, and so on.

[R] Graphing question/possibly lattice/xyplot

2005-03-02 Thread Erin Hodgess
Dear R People: I have a data frame with the variables calories, sodium and type, where type is either zero or one. I would like to produce a scatterplot with sodium on the horizontal, calories on the vertical and have the dots be clear when type is one and black when type is zero. It can be

Re: [R] Using varPower in gnls, an answer of sorts.

2005-03-02 Thread Prof Brian Ripley
On Wed, 2 Mar 2005 [EMAIL PROTECTED] wrote: Back on January 16, a message on R-help from Ravi Varadhan described a problem with gnls using weights=varPower(). The problem was that the fit failed with error [...] I'm sending this to r-help rather to the authors of nlme because I am not sure where

Re: [R] Suppressing observation numbers

2005-03-02 Thread Rolf Turner
Nam-Ky Nguyen wrote: Below is a part of the R output. Please consider the two lines: data model.matrix(m1) Is there a way of suppressing the observation numbers 1, 2, ...27 in the output (I don't want these number to appear in the output)? The (``relatively low level''?) function

Re: [R] Suppressing observation numbers

2005-03-02 Thread Prof Brian Ripley
On Thu, 3 Mar 2005, Nam-Ky Nguyen wrote: Dear R gurus, Below is a part of the R output. Please consider the two lines: data model.matrix(m1) Is there a way of suppressing the observation numbers 1, 2, ...27 in the output (I don't want these number to appear in the output)? Actually, these are the

[R] apply a function to a rolling subset of a vector

2005-03-02 Thread Ken Knoblauch
Try this: ?convolve x-rnorm(1000) y-rep(1,20) z-convolve(x,y,type=filter) plot(x,type=l) str(z) num [1:981] 6.31 7.28 8.16 7.39 4.65 ... lines(c(rep(0,10),z,rep(0,10)),col=yellow,lwd=3) lines(c(rep(0,10),z,rep(0,10))/length(y),col=red,lwd=3) #running mean You wrote: Does anyone know an

Re: [R] apply a function to a rolling subset of a vector

2005-03-02 Thread Duncan Murdoch
On Wed, 2 Mar 2005 17:22:43 -0500, Whit Armstrong [EMAIL PROTECTED] wrote : Does anyone know an easy way to calculate the rolling 20 period average or sum of a vector? For instance: x - rnorm(1000) y - apply.subset(x,20,fun=sum) The first element of y would contain the sum of elements 1 to 20,

Re: [R] apply a function to a rolling subset of a vector

2005-03-02 Thread Marc Schwartz
On Wed, 2005-03-02 at 17:22 -0500, Whit Armstrong wrote: Does anyone know an easy way to calculate the rolling 20 period average or sum of a vector? For instance: x - rnorm(1000) y - apply.subset(x,20,fun=sum) The first element of y would contain the sum of elements 1 to 20, the

Re: [R] apply a function to a rolling subset of a vector

2005-03-02 Thread Gabor Grothendieck
Whit Armstrong whit at twinfieldscapital.com writes: : : Does anyone know an easy way to calculate the rolling 20 period average : or sum of a vector? : : For instance: : x - rnorm(1000) : : y - apply.subset(x,20,fun=sum) : : The first element of y would contain the sum of elements 1 to 20,

RE: [R] apply a function to a rolling subset of a vector

2005-03-02 Thread Whit Armstrong
Thanks, everyone, for all the suggestions. The rollFun turs out to be just what I needed. Cheers, Whit -Original Message- From: Kjetil Brinchmann Halvorsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 5:45 PM To: Whit Armstrong Cc: r-help@stat.math.ethz.ch Subject: Re:

Re: [R] subset selection for logistic regression

2005-03-02 Thread Frank E Harrell Jr
Christian Hennig wrote: Perhaps I should not write it because I will discredit myself with this but... Suppose I have a setup with 100 variables and some 1000 cases and I want to boil down the number of variables to a maximum of 10 for practical reasons even if I lose 10% prediction quality by

Re: [R] Graphing question/possibly lattice/xyplot

2005-03-02 Thread Deepayan Sarkar
On Wednesday 02 March 2005 16:24, Erin Hodgess wrote: Dear R People: I have a data frame with the variables calories, sodium and type, where type is either zero or one. I would like to produce a scatterplot with sodium on the horizontal, calories on the vertical and have the dots be clear

[R] power law distribution; making new distributions

2005-03-02 Thread rcran . 10 . escoffier
hi i have data which i think is coming from a power law distribution P(X a) = c/a^k and i would like to find the exponent and constant. i would like it to use my experimental data to find c and k. also, if i would like to create a new distribution, is it easy to add to R, if so, how is that

[R] total variation penalty

2005-03-02 Thread Vadim Ogranovich
Hi, I was recently plowing through the docs of the quantreg package by Roger Koenker and came across the total variation penalty approach to 1-dimensional spline fitting. I googled around a bit and have found some papers originated in the image processing community, but (apart from Roger's

Re: [R] power law distribution; making new distributions

2005-03-02 Thread Spencer Graves
You've cited one form of the Pareto distribution (http://mathworld.wolfram.com/ParetoDistribution.html). A slightly different form is available in Jim Lindsey's package rmutil. This is not available CRAN, but can be assessed by www.r-project.org - search - R site search - Jim Lindsey's

Re: [R] total variation penalty

2005-03-02 Thread roger koenker
On Mar 2, 2005, at 6:25 PM, Vadim Ogranovich wrote: I was recently plowing through the docs of the quantreg package by Roger Koenker and came across the total variation penalty approach to 1-dimensional spline fitting. I googled around a bit and have found some papers originated in the image

[R] Rounding parameter values in genoud(), Rgenoud package

2005-03-02 Thread Jasjeet Sekhon
Hi Scott, I would like genoud to internally limit parameters to 4 decimal places as shown in this output. Thanks for the question. I don't know what your application is but you may want to use the integer datatype (data.type.int=TRUE) and then rescale the parameters in your function to

Re: [R] Suppressing observation numbers

2005-03-02 Thread Nam-Ky Nguyen
Thank you VERY much for Brian's HINT and Rolf's ANSWER. NKN. On Thu, 3 Mar 2005, Nam-Ky Nguyen wrote: Dear R gurus, Below is a part of the R output. Please consider the two lines: data model.matrix(m1) Is there a way of suppressing the observation numbers 1, 2, ...27 in the output (I