Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread Bryan Hanson
for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Bryan Hanson Verzonden: vrijdag 2 oktober 2009 17:21 Aan: R Help Onderwerp

[R] ggplot2: proper use of facet_grid inside a function

2009-10-02 Thread Bryan Hanson
mclust_3.2 MASS_7.2-48 [21] lars_0.9-7 e1071_1.5-19 class_7.2-48 loaded via a namespace (and not attached): [1] cluster_1.12.0 Thanks for any help! Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA

[R] Teasing out logrank differences *between* groups using survdiff or something else?

2009-09-15 Thread Bryan Hanson
it and wouldn't trust ourselves anyway, given the special nature of survival analysis. Manual instructions or a function suggestion would be great. Thanks in Advance, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA

Re: [R] Teasing out logrank differences *between* groups using survdiff or something else?

2009-09-15 Thread Bryan Hanson
If in fact it is true? Maybe the answer is already in our output, in the sense that the CI's don't overlap much? Maybe we are wrong to seek a p value as well? Thanks again, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 9/15/09

[R] xyplot {lattice} are different types possible for each panel?

2009-09-07 Thread Bryan Hanson
, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA y - rnorm(100) x - rnorm(100) names - rep(c(Set 1, Set 2, Set 3), 4) df - data.frame(y = y, x = y, names = as.factor(names)) p - xyplot(y ~ x | names, layout = c(1, 3), panel

Re: [R] xyplot {lattice} are different types possible for each panel?

2009-09-07 Thread Bryan Hanson
(...,type = type)          }        }) plot(p) HTH, baptiste 2009/9/7 Bryan Hanson han...@depauw.edu Hello R Folks... Using the example below, Iąd like two of the panels to be plotted with type = łp˛ but the third to be done with type = łh˛.  I canąt use type

[R] Matrix as input to xyplot {lattice} - proper extended formula syntax

2009-09-05 Thread Bryan Hanson
don¹t recognize it if I have! Is there a more elegant way to tell xyplot I want to use each row of y repeatedly with the same x, in a loop-like fashion? TIA. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA [[alternative HTML

Re: [R] Matrix as input to xyplot {lattice} - proper extended formula syntax

2009-09-05 Thread Bryan Hanson
string? p - xyplot(y.1+y.2+y.3+y.4 ~ x |1:4, data = df, main = title ,layout=c(1,4) ) p On Sep 5, 2009, at 11:52 PM, Bryan Hanson wrote: Hello R Folks... I have a list with the following structure: str(df) List of 3 $ y: num [1:4, 1:1242] -0.005379 0.029874 -0.023274

Re: [R] Google's R Style Guide (has become S3 vs S4, in part)

2009-09-01 Thread Bryan Hanson
an S4 object, then I would have to go back, redefine the object, update validObject, and possibly write some new accessor and definitely constructor functions. At least, that's how I understand the way one uses S4 classes. Back to trying to get something done! Bryan * Bryan Hanson

Re: [R] Lattice in a loop does not produce output

2009-08-18 Thread Bryan Hanson
Lattice objects must be assigned and deliberately printed: png(test.png) p - xyplot(y~x|z) plot(p) dev.off() Should fix both problems. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 8/18/09 8:13 AM, Alex van der Spek am

[R] Selecting/Accessing the last vector in a list of a list of data.frames

2009-08-11 Thread Bryan Hanson
, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Selecting/Accessing the last vector in a list of a list of data.frames

2009-08-11 Thread Bryan Hanson
, Henrique Dallazuanna www...@gmail.com wrote: If I understand correctly your question, you can try something about like this: # Access all elements named 'V1' in your list lapply(test, lapply, '[', 'V1') On Tue, Aug 11, 2009 at 3:49 PM, Bryan Hanson han...@depauw.edu wrote: Hello Again R

[R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-10 Thread Bryan Hanson
, does it make sense to spend the time making the change? Any perspective and advice would be welcomed. Thanks in advance, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA __ R-help@r-project.org

[R] str(data.frame) after subsetting reflects original structure, not subsetted structure?

2009-07-24 Thread Bryan Hanson
* Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] str(data.frame) after subsetting reflects original structure, not subsetted structure?

2009-07-24 Thread Bryan Hanson
Thanks Marc and Ben... Your answers were most helpful. I suspected something had been written about it, but was having trouble formulating a reasonable search query. I was looking in the help page for str(), which was sort of a dead end. Bryan * Bryan Hanson Professor of Chemistry

[R] panel.lmline - are m, b, and r^2 accessible somehow?

2009-07-22 Thread Bryan Hanson
done manually within panel.groups ( http://www.nabble.com/add-trend-line-to-each-group-of-data-in%3A-xyplot(y1%2 By2-~-x-|-grp...-td3344023.html#a3382909) but that was a few versions back. Other suggestions? Thanks, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw

[R] Managing Packages: Which functions call other functions in package?

2009-07-01 Thread Bryan Hanson
might provide; maybe that¹s where I should be looking? Does such a thing exist? Thanks, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA [[alternative HTML version deleted]] __ R-help

Re: [R] How do I define the method for gcheckboxgroup in gWidgets?

2009-06-27 Thread Bryan Hanson
On 6/27/09 8:25 AM, Michael Lawrence mflaw...@fhcrc.org wrote: On Thu, Jun 25, 2009 at 8:29 AM, Bryan Hanson han...@depauw.edu wrote: Hi All... I¹m trying to build a small demo using gWidgets which permits interactive scaling and selection among different things to plot.  I can get

[R] How do I define the method for gcheckboxgroup in gWidgets?

2009-06-25 Thread Bryan Hanson
, but not so for gcheckboxgroup. A big TIA, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA Full Script: x - 1:10 y1 - x y2 - x^2 y3 - x^0.5 y4 - y^3 df - as.data.frame(cbind(x, y1, y2, y3, y4)) stuff - c(y = x, y = x^2, y = x^0.5, y = x^3

Re: [R] Questíon regarding the use of write.csv2 , write.table ...

2009-06-18 Thread Bryan Hanson
Write.table will give you all the control you need to get exactly what you want. Bryan On 6/18/09 7:50 AM, xavier.char...@free.fr xavier.char...@free.fr wrote: Hi, It sounds like the first column that is added is actually the row names. That's why a previous answer pointed this argumented.

Re: [R] R in the NY Times

2009-01-07 Thread Bryan Hanson
when a software problem in the designing of the engine makes your plane fall out of the sky! Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA ³I think it addresses a niche market for high-end data analysts that want free, readily available

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Bryan Hanson
that this was possible on some R code that went with a Wikipedia entry, and he tried it, and it works. YMMV. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 8/4/08 1:09 PM, Bert Gunter [EMAIL PROTECTED] wrote: No. Can't be. Editable

Re: [R] Properly Parsing Pre-Superscripts Displaying Them With grid.text

2008-08-02 Thread Bryan Hanson
at 17:23 -0400, Bryan Hanson wrote: Hi all... I¹m making a chart dealing with frequencies of isotopes of various elements. For instance, I'd like the following text to appear on a chart with the 35 and 37 as superscripts: Based upon: 35Cl: 75% 37Cl: 25% I am having problems properly parsing

[R] Properly Parsing Pre-Superscripts Displaying Them With grid.text

2008-08-01 Thread Bryan Hanson
Hi all... I¹m making a chart dealing with frequencies of isotopes of various elements. For instance, I'd like the following text to appear on a chart with the 35 and 37 as superscripts: Based upon: 35Cl: 75% 37Cl: 25% I am having problems properly parsing the superscript that preceeds the Cl,

[R] Conditionally Updating Lattice Plots

2008-07-20 Thread Bryan Hanson
Hi All... I can¹t seem to find an answer to this in the help pages, archives, or Deepayan¹s Lattice Book. I want to do a Lattice plot, and then update it, possibly more than once, depending upon some logical options. Code below; it produces a second plot page when the second update is called,

[R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread Bryan Hanson
Still playing with Lattice... I want to use panel.text(x, y etc) but with x and y in plot coordinates (0,1), not user coordinates. I think if I had this problem with traditional graphics, I could use grconvertX to make the change. I did come across convertX {grid} but this doesn't seem to be

Re: [R] Lattice Version of grconvertX or variant on panel.text?

2008-07-20 Thread Bryan Hanson
Never mind, I just hard-coded it using ratios. Simpler than I thought. Thanks, Bryan On 7/20/08 9:03 PM, Bryan Hanson [EMAIL PROTECTED] wrote: Still playing with Lattice... I want to use panel.text(x, y etc) but with x and y in plot coordinates (0,1), not user coordinates. I think if I

Re: [R] .First and .Rprofile won't run on startup

2008-07-14 Thread Bryan Hanson
I accomplish this a little differently. On the mac, in your home directory (e.g. /Users/susanamrose) there is/could be a hidden file called .Rprofile You can edit it with vi for instance by getting a terminal window and vi .Rprofile It will be created it if it doesn't exist. I keep all my

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-24 Thread Bryan Hanson
If anyone remains interested, the solution in base graphics is to modify stripchart.default, the last couple of lines where the coloring of points defaults in a way that depends on groups. In my example, the groups are being handled collectively with the coloring. Code is below. Deepayan has

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-23 Thread Bryan Hanson
Thanks Deepayan. That's the conclusion I have gradually reaching! Bryan On 6/23/08 5:57 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 6/22/08, Bryan Hanson [EMAIL PROTECTED] wrote: Thanks Gabor, I'm getting closer. Is there a way to spread out resp values vertically for a given value

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-22 Thread Bryan Hanson
Below is a revised set of code that demonstrates my question a little more clearly, I hope. When plotting all the data (5th panel), col sym don't seem to be passed correctly, as the (random) first value for col sym are used for all points (run the code, then run it again, you'll see how the 5th

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-22 Thread Bryan Hanson
, 2008 at 10:43 AM, Bryan Hanson [EMAIL PROTECTED] wrote: Below is a revised set of code that demonstrates my question a little more clearly, I hope. When plotting all the data (5th panel), col sym don't seem to be passed correctly, as the (random) first value for col sym are used for all

[R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-21 Thread Bryan Hanson
? And truthfully, I¹d rather be doing this with Lattice, but I¹ve tried several variations of stripplot and can¹t even get something with the general layout of the stripchart version. Thanks, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA index

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Bryan Hanson
[I've ommitted some of the conversation so far...] E.g. in a logistic model, with (say) eta = beta_0 + beta_1*x one may find, on the linear predictor scale, A and B (say) such that P(A = eta = B) = 0.95. Then P(expit(A) = expit(eta) = expit(B)) = 0.95, which is exactly what is wanted. I

Re: [R] Pointwise Confidence Bounds on Logistic Regression

2008-06-19 Thread Bryan Hanson
, col = lightblue) lines(fit2$model$x, bands$lower2, col = lightblue) On 6/19/08 12:28 PM, Gavin Simpson [EMAIL PROTECTED] wrote: On Thu, 2008-06-19 at 10:42 -0400, Bryan Hanson wrote: [I've ommitted some of the conversation so far...] E.g. in a logistic model, with (say) eta = beta_0

[R] Pointwise Confidence Bounds on Logistic Regression

2008-06-18 Thread Bryan Hanson
* Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Suggestions: Terminology Pkgs for following spectra over time

2008-04-16 Thread Bryan Hanson
will be appreciated. TIA, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle Indiana USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Definition of wrapper?

2008-03-30 Thread Bryan Hanson
looked in a couple of the classic R texts, the extensions and developers' manuals, and R help archives, and didn't find a definition. Of course, I may have missed it. Thanks in advance. Bryan ** Bryan Hanson Professor of Chemistry Biochemistry DePauw University 602 S. College

Re: [R] Problem with graphics device in Mac OS X

2007-12-10 Thread Bryan Hanson
For whatever reason, on the Mac, you have to open a new Quartz device window before making the graphics call. So, from the menu, pull down under Window to New Quartz Device Window. Then all graphics calls go to that (initially empty) window, and any further calls replace the previous contents of

[R] Graphical Manova: Fails When There Are Three Factors

2007-11-16 Thread Bryan Hanson
Hi R Gurus Lurkers... Thanks in advance to anyone who is willing to tackle this! Bryan I have been implementing the graphical manova method described in An Introduction to Ggobi (from the Ggobi web site). A stand alone working code is appended below. The code is almost the same as described

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-31 Thread Bryan Hanson
,] sample.colors = sample.info[2,]; sample.colors = as.character(sample.colors[-1]) sample.class = sample.info[3,]; sample.class = as.character(sample.class[-1]) data = read.table(input.file.name, sep=,, skip=3) colnames(data) = sample.names On 10/30/07 10:53 PM, Bryan Hanson [EMAIL PROTECTED] wrote: Jim

[R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread Bryan Hanson
in advance, Bryan * Bryan Hanson Professor of Chemistry Biochemistry [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread Bryan Hanson
0.150 0.166 0.172 0.158 6432 0.142 0.150 0.162 0.148 On 10/30/07, Bryan Hanson [EMAIL PROTECTED] wrote: Hi Folks... Œbeen playing with this for a while, with no luck, so I¹m hoping someone knows it off the top of their head... Difficult to find this nuance

[R] Accessing scripts in a different directory on a Mac

2007-10-25 Thread Bryan Hanson
Hi all. A question for knowledgeable folks using R on an Intel Mac running OS X 10.4.10 For ease of maintenance, I have broken a large R script into a main script which ³oversees² things by calling other scripts, using ³source². Let¹s call the secondary scripts ³sub-scripts.² I¹d like for the

<    1   2