[R] Using grid graphics (hexbin) in pairs() plot problem

2007-10-19 Thread Steffen Neumann (on the road)
Hi, I am trying to create a plot with pairs() using a gplot.hexbin() for each pair. For pairs I can provide a custom upperPanel function: pairs(iris[1:4], panel=mypanel) and mypanel() calls plot.hexbin(): library(hexbin) # Bioconductor mypanel - function(x, ...){ hb -

Re: [R] vector graphics/ ungroup and edit in CorelDraw

2007-10-19 Thread Prof Brian Ripley
The R graphics model is low-level, and the problem is CorelDraw's limited capabilities (Adobe Illustrator seems to do rather better with postscript generated by R). The XFig and SVG drivers may produce output that is more easily editable, but ultimately the problem is that R graphics is done

Re: [R] Declaring variables in R

2007-10-19 Thread Gabor Grothendieck
See findGlobals in the codetools package. On 10/19/07, Moshe Olshansky [EMAIL PROTECTED] wrote: Please forgive me if my question is answered in Help FAQ no. 23481739... In language like C every variable must be declared before it can be used. In VBA, if a variable has not been declared it

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Klaus Friis Østergaard
2007/10/19, Frede Aakmann Tøgersen [EMAIL PROTECTED]: If you carefully read the man for boxplot (?boxplot) you can see in the examples that you can put in a ylim as an argument to the boxplot function: boxplot(3:5, 2:4,4:6, ylim = c(0, 8)) See also ?bxp. best regards Frede Thank you

Re: [R] cut with intervals open on the right?

2007-10-19 Thread Pedro de Barros
Thanks for the quick and nice reply. I must apologise twice: 1-I should have reported I am using R 2.5.1 on Windows; 2- It was a spelling error on my part (rigth instead of right). Pedro At 11:27 2007/10/19, you wrote: Works for me with current R-2.6.0 (but you haven't told us about your R

[R] Odp: Manual recycling of vectors?

2007-10-19 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 19.10.2007 15:58:43: Sorry if this is already answered somewhere, but I could not find it. I have two vectors, x,y, of different length, and I want to recycle the smaller one (whichever one it is) until they have the same length. I was wondering if there is

Re: [R] controlling plot range

2007-10-19 Thread Bert Gunter
John: I agree: the Docs are not clear on this. VR's MASS (p.84 in the 4th edition) gives an explanation: Positions in the plot region may also be specified in absolute **user coordinates**. Initially user coordinates and relative coordinates [..relative to the unit square of the enclosing

Re: [R] export R-data to VisIt

2007-10-19 Thread Bart Joosen
Thanks Katharine, for the moment I'm not on a PC on which VisIt is installed, but it should do the trick. By the way: to use 2 variables when creating the cdf file: ncnew - create.ncdf(filename=file.cdf, vars = list(x1,x2)) That was one of the things that was working within the 2 hours ;-).

Re: [R] controlling plot range

2007-10-19 Thread Marc Schwartz
Bert et al, A point of clarification. If one reads ?par, one will note [emphasis added]: There are several parameters can **only** be set by a call to par(): * ask, * fig, fin, * lheight, * mai, mar, mex, mfcol, mfrow, mfg, * new, * oma, omd, omi, *

Re: [R] In a SLR, Why Does the Hat Matrix Depend on the Weights?

2007-10-19 Thread Tom La Bone
Because it does. I should have looked ahead a few chapters in the book before I asked the question. However, I can't seem to reproduce the values of the hat matrix given by R for the weighted fit example I gave. Any suggestions (other than looking ahead a few more chapters)? Tom

[R] conduct pairwise column comparisons without comparing a column to itself

2007-10-19 Thread Luke Neraas
# Hello # I have a question regarding pairwise calculations of a matrix using a for-loop. # Below I have a matrix X with 8 columns. These are genotypic data so Column1 Column2 is # a unit, Column3 Column4 is a unit, Column5 Column6 is a unit, and Coulmn7 8 is a unit. # I have a loop designed

Re: [R] Order of Dotplot output

2007-10-19 Thread Allison Bailey
Thanks for the suggestions. The factor function on the RYEAR column worked well. I need to clarify my question about the order of the plot. as.table appears to be concerned with the order that each panel is plotted. Is that correct? I'm interested in controlling the order of the elements

Re: [R] Conduct pairwise column comparisons without comparing a column to itself

2007-10-19 Thread jim holtman
A little different solution, but it gives you the matches and the columns in a more compact form. You can always take the data and use it to put into your array. # creation of the data matrix c1- c(1,4,3,2,4,1,3,2,4,3) c2- c(2,4,3,4,4,3,4,1,3,2) c3- c(1,3,2,4,4,3,4,4,2,2) c4-

Re: [R] resclaing/resampling data

2007-10-19 Thread Jim Lemon
Jim Lemon wrote: Jan M. Wiener wrote: hello, I am trying to rescale a matrix according to one column in the matrix. Imagine having two matrices with 2 columns each: mat1: 12.1 22.2 3 2.2 4 2.4 5 2.7 6 2.9 mat2: 11.9 22.0 3 2.1 4 2.2 5 2.4 6 3.0 7. 2.8

Re: [R] resclaing/resampling data

2007-10-19 Thread Jim Lemon
Jan M. Wiener wrote: hello, I am trying to rescale a matrix according to one column in the matrix. Imagine having two matrices with 2 columns each: mat1: 12.1 22.2 3 2.2 4 2.4 5 2.7 6 2.9 mat2: 11.9 22.0 3 2.1 4 2.2 5 2.4 6 3.0 7. 2.8

Re: [R] Order of Dotplot output

2007-10-19 Thread Deepayan Sarkar
On 10/19/07, Allison Bailey [EMAIL PROTECTED] wrote: Thanks for the suggestions. The factor function on the RYEAR column worked well. I need to clarify my question about the order of the plot. as.table appears to be concerned with the order that each panel is plotted. Is that correct?

Re: [R] (no subject)

2007-10-19 Thread jim holtman
You have this sequence of code in your script: for (a in seq(1,(ncol(X)-3), by=2)){ for (b in seq(3,(ncol(X)-1), by=2)){ for (i in a){ j - a+1 for (k in b){ l - b+1 The 'for (i in a){' appears to meaningless since 'a' is just a single value. What did you think this is supposed to do?

Re: [R] In a SLR, Why Does the Hat Matrix Depend on the Weights?

2007-10-19 Thread Peter Dalgaard
Tom La Bone wrote: I understand that the hat matrix is a function of the predictor variable alone. So, in the following example why do the values on the diagonal of the hat matrix change when I go from an unweighted fit to a weighted fit? Is the function hatvalues giving me something other

[R] (no subject)

2007-10-19 Thread Luke Neraas
# Hello # I have a question regarding pairwise calculations of a matrix using a for-loop. # Below I have a matrix X with 8 columns. These are Genotypic data so Column1 Column2 is # a unit, Column3 Column4 is a unit, Column5 Column6 is a unit, and Coulmn7 8 is a unit. # I have a loop designed

[R] MailMarshal Message Digest

2007-10-19 Thread mailmarshal
Virus Folder Summary Digest for [EMAIL PROTECTED] sent on Friday, October 19, 2007 The emails listed below have been placed by MailMarshal in your Virus Folder. They will be automatically deleted after 7 days. To view your quarantine mails go to http://mail5.smarthome.com/SpamConsole From:

[R] How to use lm() with both subset and weights argument

2007-10-19 Thread Alp Atıcı
I'd like to fit a linear model on a subset of a data frame with given weights. I am curious how the lm() works when both subset and weights argument is specified. Let me give an example: filter is a boolean vector of length the same as one column of df, my dataframe. What I want is the linear

Re: [R] tcltk: help with tkmenubutton

2007-10-19 Thread Alberto Monteiro
I wrote: [note to self: I must stop this schizophrenic habit of replying to self. note to self II: I must also stop making notes to self] I am struck here. What magic inchantation is required with tkmenubutton? (...) # HERE!!! What is the magic inchantation that I must use here? # #

Re: [R] RMySQL LoadLibrary failure: Invalid access to memory location.

2007-10-19 Thread Talbot Katz
Hi. A colleague of mine figured out how to get the RMySQL 0.6 package to load properly in our environment with MySQL 5.0.45. Every time I tried to load the RMySQL library in R 2.5.1 I was getting an error message: LoadLibrary failure: Invalid access to memory location. We did the

Re: [R] Order of Dotplot output

2007-10-19 Thread Deepayan Sarkar
On 10/19/07, Allison Bailey [EMAIL PROTECTED] wrote: I'm just learning to work with R, and am having some difficulty controlling the output of my dotplot. The default order of the function dotchart seems to be the largest value on the bottom and the smallest on the top. I wanted it in the

Re: [R] adding aggregate data to data frames

2007-10-19 Thread John Kane
I have been trying to figure out how Hadley Wickhams reshape package works and I tried it on what may be your problem. Here is my example. Does it do something like what you want? === # Test Data zz - subj cond t1 t2 t3 A1 4 5 7 A2

Re: [R] export R-data to VisIt

2007-10-19 Thread Katharine Mullen
Below is an example R - netCDF - R for rows of a dataframe that are numeric vectors --note however that your dataframe includes character vectors. I can't look into that case at the moment - maybe it's easy to solve, or maybe you have to do some hashing. ## begin ex. library(ncdf) dat -

[R] Order of Dotplot output

2007-10-19 Thread Allison Bailey
I'm just learning to work with R, and am having some difficulty controlling the output of my dotplot. The default order of the function dotchart seems to be the largest value on the bottom and the smallest on the top. I wanted it in the opposite order (which is how my data frame is currently

Re: [R] Declaring variables in R

2007-10-19 Thread Thomas Lumley
On Thu, 18 Oct 2007, Moshe Olshansky wrote: Please forgive me if my question is answered in Help FAQ no. 23481739... If it were, we might well not forgive you -- the faq isn't *that* long. But it isn't. In VBA one can use a special statement (Option Explicit) which does not allow using

[R] adding aggregate data to data frames

2007-10-19 Thread Dieter Vanderelst
Dear List, I have a data frame containing reaction times of participants in some experiment. As usual each line is single trial in the experiment. Two factors denote the conditions in the experiment. Each participant completes different trials for each condition. Now, the question: I want

Re: [R] export R-data to VisIt

2007-10-19 Thread Bart Joosen
Peter, what a quick response! But unfortunately, yes I tried the ncdf package, I looked at the examples, but after 2 hours trying and many, many errors, I gave up. Bart - Original Message - From: Peter Dalgaard [EMAIL PROTECTED] To: Bart Joosen [EMAIL PROTECTED] Cc: [EMAIL

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-19 Thread Weiwei Shi
frequent itemset, yeah.. I did not use that for a while thanks. On 10/19/07, Gad Abraham [EMAIL PROTECTED] wrote: Weiwei Shi wrote: Hi, I am looking for an algorithm (better if it is implemented in R) which can do the following: from the following list: a,b,c,d a,b,c b,c

Re: [R] export R-data to VisIt

2007-10-19 Thread Peter Dalgaard
Bart Joosen wrote: Hello, Is there anyone porting R data to VisIt (http://www.llnl.gov/visit/)? Altough VisIt accepts 5 dozen of data formats, I can't get my data into VisIt. I currently ran a simulation which gave me a data frame, which I wanted to import into VisIt to further explore the

[R] lmer(.): extract fitted values

2007-10-19 Thread Christine Adrion
Hello, I am looking for a way to extract fitted values of a 2-level generalized linear mixed model using lme4-package. As it is a Poisson-model, I have to use lmer(.), e.g.: (y ~ x1 + x2 + (1|PtID), data = mydata, family = poisson, method = ML) If it was a linear mixed model with normally

Re: [R] How to save association rules generated by arules package

2007-10-19 Thread AA
I am not sure if this is what you want but to re-direct the results to a file see ?sink good luck AA. - Original Message - From: Ashish Jha [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 17, 2007 2:46 AM Subject: [R] How to save association rules generated by arules

[R] Manual recycling of vectors?

2007-10-19 Thread Charilaos Skiadas
Sorry if this is already answered somewhere, but I could not find it. I have two vectors, x,y, of different length, and I want to recycle the smaller one (whichever one it is) until they have the same length. I was wondering if there is a anything better than something like: x-1:3 y-1:10

Re: [R] header

2007-10-19 Thread John Kane
I'm no expert in R but I think that read.table simply will not start a variable with a numeric. If you really want the names to be as listed below you can assign them after import by using : names(mydata) - c(name, 20_1_TT_Z_e4 20_2_TT_Z_e4) name is a factor as far as I can see because that is

Re: [R] X matrix deemed to be singular in counting process coxph

2007-10-19 Thread Terry Therneau
What you have is a slightly more subtle variant of the following: library(survival) data(lung) mydata - cbind(lung, newvar =2) coxph(Surv(time, status) ~ ph.karno + newvar, mydata) coef exp(coef) se(coef) z p ph.karno -0.0164 0.984 0.00585 -2.81

Re: [R] header

2007-10-19 Thread Neuer Arkadasch
Maybe I had to write that the original data what I read are name 20_1_TT_Z_e4 20_2_TT_Z_e4 A1 10222 A2 10321 A3 10720 Thatk you! Neuer Arkadasch [EMAIL PROTECTED] schrieb: Hi everyone, I read the following

[R] unable to interactively label curves on a plot

2007-10-19 Thread Quin Wills
Hello all Simple question for the gurus. I'm trying to interactively label curves on a single plot. The labcurve() function from Hmisc seems like the way to do this (?). I just can't seem to get it to work. Toy example: x - 1:10 y1 - x^2 y2 - 2*x plot(x,y1) lines(x,y2)

[R] inverser terrain.colors

2007-10-19 Thread Dong-hyun Oh
Dear UserRs, I draw filled contour plot with filled.contour function. By default, colors of filled.contour is terrain.colors which alters from green (the lowest level) to white (the highest level). I want the colors to alter from white (the lowest level) to green (the highest level). How

Re: [R] inverser terrain.colors

2007-10-19 Thread Henrique Dallazuanna
Perhaps: z - matrix(1:10, nrow=1) image(z, col=rev(terrain.colors(10))) On 19/10/2007, Dong-hyun Oh [EMAIL PROTECTED] wrote: Dear UserRs, I draw filled contour plot with filled.contour function. By default, colors of filled.contour is terrain.colors which alters from green (the lowest

Re: [R] r achives

2007-10-19 Thread Ted Harding
On 19-Oct-07 09:36:52, raymond chiruka wrote: sorry but how do i accsess r archives If you mean the archive of postings to the R-help list, then: http://stat.ethz.ch/pipermail/r-help/ For a general search through R-related material (including R-help):

Re: [R] cut with intervals open on the right?

2007-10-19 Thread Uwe Ligges
Works for me with current R-2.6.0 (but you haven't told us about your R version!): cut(1:5, 1:5) [1] NA (1,2] (2,3] (3,4] (4,5] Levels: (1,2] (2,3] (3,4] (4,5] cut(1:5, 1:5, right=FALSE) [1] [1,2) [2,3) [3,4) [4,5) NA Levels: [1,2) [2,3) [3,4) [4,5) Uwe Ligges Pedro de Barros wrote:

Re: [R] r achives

2007-10-19 Thread Uwe Ligges
raymond chiruka wrote: sorry but how do i accsess r archives Which archives, R version? Package versions? Mailing list archives Uwe Ligges __ [[alternative HTML version deleted]]

Re: [R] error: unused arguments

2007-10-19 Thread Jim Lemon
Aydemir, Zava (FID) wrote: Hi what does this mean when i get above error? When I call function foo(), specifying parameters a and b as below a-5 b-6 y - foo(a,b) Error in foo(a, b) : unused argument(s) (6) Hi Zava, As the other Jim noted, it looks like foo() is declared with only

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Klaus Friis Østergaard
2007/10/19, Frede Aakmann Tøgersen [EMAIL PROTECTED]: So where is the reproducable example? How can we know that you're not doing boxplot(1:10) abline(h = 400, col = red)? best regards Frede You are right, a reproducable example should have been there. I don't know what I mistyped

[R] r achives

2007-10-19 Thread raymond chiruka
sorry but how do i accsess r archives __ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] GRANT DONATION

2007-10-19 Thread Mr kass Folkard
The Fondation De France(FDF) ( http://www.fdf.org), would like to notify you that you have been chosen by the Board of Trustees as one of the final recipients of a Cash Grant/Donation for your Personal, Educational, and Business Development. The Fondation De France(FDF) was conceived with the

[R] cut with intervals open on the right?

2007-10-19 Thread Pedro de Barros
Dear All, I am trying to use cut() to produce intervals open on the right, but it seems to ignore the argument right=F, contrary to what is indicated on the help for cut. Can anyone help? Thanks, Pedro __ R-help@r-project.org mailing list

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-19 Thread Berwin A Turlach
G'day Ralf, On Fri, 19 Oct 2007 09:51:37 +0200 Ralf Goertz [EMAIL PROTECTED] wrote: Thanks to Thomas Lumley there is another convincing example. But still I've got a problem with it: x-c(2,3,4);y-c(2,3,3) [...] That's okay, but neither [...] nor [...] give the result of

[R] FatherIn manners as in shape. thy.

2007-10-19 Thread Rubin Morrison
Which marketers have used to hype the internet as a seamless part of everyday life. Already achieved universal access thanks to the 6000 UK Online centres that have. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Frede Aakmann Tøgersen
So where is the reproducable example? How can we know that you're not doing boxplot(1:10) abline(h = 400, col = red)? best regards Frede Fra: [EMAIL PROTECTED] på vegne af Klaus Friis Østergaard Sendt: fr 19-10-2007 09:55 Til: Gabor Grothendieck

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Gabor Grothendieck
It works for me. Perhaps you could make the line thicker. abline(h = 4, col = red, lwd = 3) On 10/19/07, Klaus Friis Østergaard [EMAIL PROTECTED] wrote: 2007/10/19, Gabor Grothendieck [EMAIL PROTECTED]: Try this: boxplot(1:10) abline(h = 4, col = red) Have tried it, I only get the

Re: [R] power law fit with unknown zero

2007-10-19 Thread Philipp Pagel
I would like to do a fit of the form: y = a (x+c)**b, where a, b and c are unknown. The popular method of fitting a linear model to log-log transformed data was already mentioned. ALthough this works in many situations, it is considered to be somewhat biased an not very robust. I suggest to

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Klaus Friis Østergaard
2007/10/19, Gabor Grothendieck [EMAIL PROTECTED]: Try this: boxplot(1:10) abline(h = 4, col = red) Have tried it, I only get the boxplot, no red line. It works on the plotte images. That is why I asked the question here on the list. -- Klaus F. Østergaard, farremosen(at)gmail dot com

Re: [R] Help deeded: Does a R graphical function return something special?

2007-10-19 Thread jim holtman
What exactly are you trying to determine? You can look at the help page for a function to see what, if any, value is returned. If you are 'try'ing to catch an error, then the following might help: x - plot(0) x NULL x - plot() Error in plot() : argument x is missing, with no default x NULL

[R] export R-data to VisIt

2007-10-19 Thread Bart Joosen
Hello, Is there anyone porting R data to VisIt (http://www.llnl.gov/visit/)? Altough VisIt accepts 5 dozen of data formats, I can't get my data into VisIt. I currently ran a simulation which gave me a data frame, which I wanted to import into VisIt to further explore the dataframe. Let's say I

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Frede Aakmann Tøgersen
If you carefully read the man for boxplot (?boxplot) you can see in the examples that you can put in a ylim as an argument to the boxplot function: boxplot(3:5, 2:4,4:6, ylim = c(0, 8)) See also ?bxp. best regards Frede Fra: Klaus Friis Østergaard

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 19.10.2007 11:24:23: 2007/10/19, Frede Aakmann Tøgersen [EMAIL PROTECTED]: So where is the reproducable example? How can we know that you're not doing boxplot(1:10) abline(h = 400, col = red)? best regards Frede You are right, a

Re: [R] Import from excel 2007

2007-10-19 Thread Prof Brian Ripley
Now my Windows machine is back online again, I have been able to do some work on this. You can download the latest ODBC drivers from download.microsoft.com (select Office as the product, search for ODBC and you will get to AccessDatabaseEngine.exe). You don't need any version of Office

Re: [R] Adding horizontal lines to Boxplot

2007-10-19 Thread Gabor Grothendieck
Try this: boxplot(1:10) abline(h = 4, col = red) On 10/18/07, Klaus Friis Østergaard [EMAIL PROTECTED] wrote: Hi, Is it possible to add horizontal lines to a boxplot. I want to add these lines in ordre to indicate where tolerance limits on the boxplot. -- Klaus F. Østergaard,

Re: [R] replacement

2007-10-19 Thread John Kane
mydata[is.na(mydata)] - NaN should work --- Samor Gandhi [EMAIL PROTECTED] wrote: Hi, Is it possible to do the following mydata yx 1 0.3 1 2 0.8 NA 3 NA 0 4 0.2 1 I would like to solve mydata - replace(mydata, NA, NaN) Thanks!

Re: [R] header

2007-10-19 Thread Marc Schwartz
See ?make.names, specifically the Details section which notes: A syntactically valid name consists of letters, numbers and the dot or underline characters and starts with a letter or the dot not followed by a number. Names such as .2way are not valid, and neither are the reserved words. The

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-19 Thread Thomas Lumley
On Fri, 19 Oct 2007, Ralf Goertz wrote: = Thanks to Thomas Lumley there is another convincing example. But still I've got a problem with it: x-c(2,3,4);y-c(2,3,3) 1-2*var(residuals(lm(y~x+1)))/sum((y-mean(y))^2) [1] 0.75 That's okay, but neither