Re: [R] Color individual leaf labels in dendrogram

2010-10-15 Thread Bryan Hanson
Henrik, there is an easily adaptable example in this thread: http://r.789695.n4.nabble.com/coloring-leaves-in-a-hclust-or-dendrogram-plot -tt795496.html#a795497 HTH. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 10/15/10 9:05 AM

Re: [R] Ordination plot option missing from PCA dialog

2010-10-22 Thread Bryan Hanson
Bill, this may be a long shot, but the error you report is extremely close to what you get on a Mac when trying to load rgl when X11 is missing. Bryan ** Bryan Hanson Professor of Chemistry Biochemistry DePauw University 602 S. College Avenue Greencastle, IN 46135 PHONE 765-658

[R] Grid newbie: aligning scaling viewports

2010-11-19 Thread Bryan Hanson
don't have the intended radius - if my math is right, the outmost circle should touch the ends of the colored axes. My sense is that this has something to do with my mis-handling of the viewports, but I can't quite see it. Any hints much appreciated! Bryan * Bryan Hanson Professor

[R] Replacing several rows of a matrix at once

2010-11-28 Thread Bryan Hanson
. What I want to do is replace multiple rows simultaneously at once. I suppose I can write a function, but this seems pretty fundamental so I feel I must be missing some obvious alternative. I'm feeling like I'm in the Inferno! TIA. Bryan * Bryan Hanson Professor of Chemistry

Re: [R] Replacing several rows of a matrix at once

2010-11-28 Thread Bryan Hanson
with. Cheers, Mike. On Mon, Nov 29, 2010 at 2:53 PM, Bryan Hanson han...@depauw.edu wrote: Hello Folks.  This must be a silly question with a (not) obvious (to me) answer. Consider this: tmp - matrix(1:200, nrow = 20) vec - 300:309 tmp[9,] - vec # replacing one row works fine p - c(3, 11

Re: [R] findInterval and data resolution

2010-07-12 Thread Bryan Hanson
Thanks Duncan... More appended at the bottom... On 7/12/10 5:38 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 12/07/2010 5:25 PM, Bryan Hanson wrote: Hello Wise Ones... I need a clever way around a problem with findInterval. Consider: vec1 - 1:10 vec2 - seq(1, 10, by = 0.1

[R] Is there a function to interdigitate two columns?

2010-07-25 Thread Bryan Hanson
it's called I'm having trouble searching. Thanks as always, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Gathering different data types for aov etc

2010-08-19 Thread Bryan Hanson
suggestions to make this more elegant and robust? I've been reading about model frames etc but don't quite see how to do a simple example such as this. Thanks, Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R version 2.11.0

[R] Passing data to aov

2010-08-26 Thread Bryan Hanson
/environment, but again, this is only an idea. TIA for any assistance. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA hypTestScores - function(mylist, score.matrix, pcs = 1:3, fac = NULL, ...) { scores - score.matrix[,pcs] #str

Re: [R] Passing data to aov

2010-08-26 Thread Bryan Hanson
it was the default as I felt at some point I would have to change it so I wanted it there as a reminder. Instead, it led me astray... Thanks so much! Bryan (coming to you from the R-Inferno today) On 8/26/10 10:14 AM, David Winsemius dwinsem...@comcast.net wrote: On Aug 26, 2010, at 8:47 AM, Bryan Hanson

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Bryan Hanson
that selecting the graphic in a viewer and cutting and pasting. Quality is top-notch and the graphic is clickable to be resized (and retains it's quality). HTH. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 9/15/10 10:38 AM

[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

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: mapping categorical variable to color aesthetic with faceting

2009-10-06 Thread Bryan Hanson
could be with more work. All advice appreciated, Bryan (session info below) * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R version 2.9.2 (2009-08-24) i386-apple-darwin8.11.1 locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8

Re: [R] ggplot2: mapping categorical variable to color aesthetic with faceting

2009-10-06 Thread Bryan Hanson
, 1, 100) # randomly remove a few points here and there last_plot() %+% test[-rem,] # replot with new dataset HTH, baptiste 2009/10/6 Bryan Hanson han...@depauw.edu: Hello Again...  I¹m making a faceted plot of a response on two categorical variables using ggplot2 and having

Re: [R] ggplot2: mapping categorical variable to color aesthetic with faceting

2009-10-06 Thread Bryan Hanson
)),   fac2 = as.factor(rep(c(lrg, lrg, sm, sm), 25))) compareCats(data = test) rem - runif(5, 1, 100) # randomly remove a few points here and there last_plot() %+% test[-rem,] # replot with new dataset HTH, baptiste 2009/10/6 Bryan Hanson han...@depauw.edu: Hello Again...  I¹m

[R] General means of matching a color specification to an official R color name

2009-10-13 Thread Bryan Hanson
of hex in df.rgb$hex.code # perhaps hex should be converted into a different color space 1st # eventually would like to display matches side by side w/hex } Thanks as always. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle

Re: [R] General means of matching a color specification to an official R color name

2009-10-13 Thread Bryan Hanson
b.rowling...@lancaster.ac.uk wrote: On Tue, Oct 13, 2009 at 9:43 PM, Bryan Hanson han...@depauw.edu wrote: Hello List Dwellers: I¹ve looked around quite a bit, but don¹t quite see an answer that I understand. I¹m looking for a way to take any kind of color specification (rgb, hsv, hcl, hex

[R] Subsetting/modifying a symbolic formula

2009-10-21 Thread Bryan Hanson
. RSiteSearch(symbolic formula) returns too many answers. No doubt I am missing the obvious, as this is my first foray into using formulas in my own functions. TIA, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R

Re: [R] Subsetting/modifying a symbolic formula

2009-10-21 Thread Bryan Hanson
) { fo[[3]] - as.name(x); fo }) one.x [[1]] y ~ f1 [[2]] y ~ f2 On Wed, Oct 21, 2009 at 11:29 AM, Bryan Hanson han...@depauw.edu wrote: Hello All.. Please consider the following: y - rnorm(20, mean = 10) f1 - as.factor(rep(c(A, B, B, A), 5)) f2 - as.factor(rep(c(C, D), 10

Re: [R] Building an R package on MAC

2009-10-22 Thread Bryan Hanson
Gina, at the terminal, make sure you are in directory Users/apple/Docments/R When you type R CMD build TEST Sounds like you might be in the TEST directory, not the R directory. The build system looks for a subdirectory with your package name when it starts. Bryan * Bryan Hanson

[R] ggplot2: stat_bin ..count.. with geom_text when NA is present

2009-10-23 Thread Bryan Hanson
why the counts don't appear on my plot? I suppose I can always clean the data first, but it would be much more practical to do that in the background during the preparation of the plot. Thanks as always, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw

Re: [R] ggplot2: stat_bin ..count.. with geom_text when NA is present

2009-10-23 Thread Bryan Hanson
= )), color = black, size = 4.0, stat = bin) print(p) } On 10/23/09 1:19 PM, Bryan Hanson han...@depauw.edu wrote: One for the ggplot2 gurus... I have a function which makes a plot just fine if the response vector (res in the example; fac1 is a factor) has no NA in it. It plots

Re: [R] PDF Corrupted?

2009-10-27 Thread Bryan Hanson
Looks like you need to do dev.off() after the plot to properly close the file. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 10/27/09 8:42 PM, rkevinbur...@charter.net rkevinbur...@charter.net wrote: I am running R

Re: [R] ggplot2: stat_bin ..count.. with geom_text when NA is present

2009-10-28 Thread Bryan Hanson
) - 0.1 * diff(range(res, na.rm = TRUE)) Hadley (drop = TRUE solves a difference problem - it controls whether or not to remove bins with zero count) On Fri, Oct 23, 2009 at 6:34 PM, Bryan Hanson han...@depauw.edu wrote: .. Adding to my original post... OK, here's a little function which

Re: [R] plot.window arguments being ignored?

2009-11-08 Thread Bryan Hanson
as necessary. Both lattice and ggplot2 have books and very nice web sites where you can find an example like yours. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 11/7/09 6:28 PM, AR_user dweitzenf...@gmail.com wrote

[R] Where are usages like == 2L documented?

2009-11-16 Thread Bryan Hanson
Gurus: I keep seeing other people¹s code that contain ideas like If (x == 2L) X[-1L] X - 1L I have some idea of what¹s going on, but where is the use of concepts like ³2L² documented? Thanks, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University

Re: [R] Where are usages like == 2L documented?

2009-11-16 Thread Bryan Hanson
not in the first few pages. Thanks for the tips. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 11/16/09 7:52 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Nov 16, 2009 at 7:25 PM, Duncan Murdoch murd

Re: [R] Where are usages like == 2L documented?

2009-11-17 Thread Bryan Hanson
for whatever reason? Are there other reasons, for instance, ways it saves lines of code? Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 11/17/09 4:20 AM, Patrick Burns pbu...@pburns.seanet.com wrote: 'The R Inferno' page 75

[R] What is mclust up to? Different clusters found if x and y interchanged

2010-04-19 Thread Bryan Hanson
Hello All... I gave a task to my students that involved using mclust to look for clusters in some bivariate data of isotopes vs various mining locations. They discovered something I didn¹t expect; the data (called tur) is appended below. p - qplot(x = dD, y = dCu65, data = tur, color = mine)

Re: [R] What is mclust up to? Different clusters found if x and y interchanged

2010-04-20 Thread Bryan Hanson
mod32mod - Mclust(tur[,3:2], initialization = list( hcPairs = hc23)) # uses mod23 initialization mod23mod[c(modelName,G)] # same as mod32 mod32mod[c(modelName,G)] # same as mod23 Hope this helps, Chris Fraley On Tue, 20 Apr 2010, Bryan Hanson wrote: Prof. Fraley, I wonder if you would

Re: [R] ggplot2: qplot won't work

2010-05-13 Thread Bryan Hanson
Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 5/13/10 1:42 AM, Ralf B ralf.bie...@gmail.com wrote: I have a script running in the StatET Eclipse environment that executes the ggplot2 command qplot in a function

Re: [R] max number from a list of numbers

2010-05-20 Thread Bryan Hanson
I think you want unlist with recursive = TRUE, see ?unlist. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 5/20/10 3:29 PM, Jonathan jonsle...@gmail.com wrote: Hi all, I'm hoping this question has a simple

[R] rgl keyboard shortcut for translation on Mac?

2009-12-06 Thread Bryan Hanson
to modify anything. So, what I can't find is a key combination that translates the object. From reading various documents about openGL, it seems there might be a toggle somewhere, but I need a hint! Or do I need to install/invoke some additional command? Thanks, Bryan * Bryan Hanson

Re: [R] rgl keyboard shortcut for translation on Mac?

2009-12-06 Thread Bryan Hanson
Murdoch murd...@stats.uwo.ca wrote: Bryan Hanson wrote: Hello Everyone. I¹m on a Mac, using rgl. Thanks to all the developers and maintainers on it! If I drag the mouse, I can rotate the view, if I hold down the option key or the ctrl key and drag, I get scaling (though at times I seem

[R] ggplot2, building a simple formula interface

2009-12-28 Thread Bryan Hanson
) f2 - rep(c(A, B), 50) mydata - data.frame(res, f1, f2) df - simple(~ res + f1, mydata) p - ggplot(df, aes(f1, res)) + geom_boxplot() plot(p) Thanks, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R version

Re: [R] Building a package using classes

2010-06-05 Thread Bryan Hanson
, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 6/5/10 10:20 AM, Sébastien Durand v8ex...@gmail.com wrote: Hello, I am looking for an efficient and complete free tutorial to learn how to properly use, create

[R] boot with strata: strata argument ignored?

2010-06-26 Thread Bryan Hanson
sense (2 levels in the factor, so $t has 2 columns). I either misunderstand the expected behavior or I've missed some punctuation or syntax detail. TIA, Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R version

Re: [R] boot with strata: strata argument ignored?

2010-06-26 Thread Bryan Hanson
Thanks Chuck, I understand much better what is going on with your example. But I'm still uncertain why the b2$t array does not have the dimensions of R x no. of strata. Any further insight would be appreciated. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry

Re: [R] graph help

2010-01-30 Thread Bryan Hanson
* Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 1/30/10 3:04 PM, Rob Manley robman...@gmail.com wrote: Hello, I'm fairly new to R and having trouble displaying my data graphically to a publishable quality. I have

[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

[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

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] 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

[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] 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] 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

[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] 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

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

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

[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

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] 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] 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

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-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] .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

[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

[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] 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

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.

[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] 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

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

[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] 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

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

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

[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

[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] 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] Why doesn't vec[-real.number] give an error or warning? Kids do the darndest things!

2010-03-13 Thread Bryan Hanson
be valuable? I can see that it avoids doing floor or as.integer in computations where an index is needed but real numbers are generated for whatever reason, but is that common? Thanks for any insight. Bryan * Bryan Hanson Acting Chair Professor of Chemistry Biochemistry DePauw University

Re: [R] Why doesn't vec[-real.number] give an error or warning? Kids do the darndest things!

2010-03-14 Thread Bryan Hanson
without breaking things.  I still have to write little test cases every so often to understand how things work, especially if you have NAs in your data and you are trying to do some equality test or do a calculation on it. On Sat, Mar 13, 2010 at 9:39 PM, Bryan Hanson han...@depauw.edu wrote: Hi

[R] [R-pkgs] Package FuncMap Now Available on CRAN

2011-03-30 Thread Bryan Hanson
the structure of the two popular plotting packages lattice and ggplot2. Bryan ** Bryan Hanson Prof. of Chemistry Biochemistry DePauw University Greencastle Indiana USA require(mvbutils) require(lattice) require(ggplot2) require(FuncMap) # Use Mark Bravington's foodweb to create the call list

[R] [R-pkgs] Package ChemoSpec 1.46 Now Available on CRAN

2011-03-30 Thread Bryan Hanson
in R. A vignette illustrating typical operations is available. Naturally, I'd be glad to hear from users with suggestions and bug reports. Bryan ** Bryan Hanson Prof. of Chemistry Biochemistry DePauw University Greencastle Indiana USA [[alternative HTML version deleted

Re: [R] (no subject)

2011-04-17 Thread Bryan Hanson
Is there any news on this issue? I have the same problem but on a Mac. I have upgraded R and updated the built packages. The console output and sessionInfo are below. The problem is triggered by library(ggplot2) my .Rprofile If I do library(ggplot2) after the aborted start up ggplot2 is

Re: [R] Singleton pattern

2012-03-16 Thread Bryan Hanson
of a singleton. You can google the archives for some great discussions of S3 vs S4 if that sounds interesting. Bryan *** Bryan Hanson Professor of Chemistry Biochemistry DePauw University On Mar 16, 2012, at 7:47 AM, David Cassany wrote: Hi all, I know it may not have much sense

Re: [R] Not getting correct graphs

2012-03-31 Thread Bryan Hanson
Attachments don't come through on this list. It would be helpful to know what you mean by junk graphs. Your coding style is a little hard to follow as it is a mix of - and - but I think you definitely have a problem in for (i in refid) which should probably be for (i in 1:length(refid))

[R] Error in calcCurveGrob(x, x$debug) : End points must not be identical

2010-12-04 Thread Bryan Hanson
Hi All... I haven¹t found mention of this error anywhere. I'm trying to draw spline curves using grid graphics. Most of the time, I have no problems, but I have some data sets that give the error in the subject line. I'm not sure which end points are identical, but the end points passed to the

Re: [R] Error in calcCurveGrob(x, x$debug) : End points must not be identical

2010-12-05 Thread Bryan Hanson
with the viewport being wrong was limited to the toy example I made. I'll send you a graphic directly so you can see what I'm working on. Thanks again for the correct test for identical endpoints. Should have been able to see that one myself! Bryan * Bryan Hanson Professor of Chemistry

Re: [R] How to change leaf color by group in hclust plot or how to install A2R package in windows?

2010-12-13 Thread Bryan Hanson
An example is described here that you can adapt: http://r.789695.n4.nabble.com/coloring-leaves-in-a-hclust-or-dendrogram-plot -tt795496.html#a795497 HTH. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA On 12/13/10 12:54 PM, Soyeon

Re: [R] Forcing standard notation in Sweave tables

2010-12-13 Thread Bryan Hanson
Take a look at package xtable. Bryan On 12/13/10 7:31 PM, Chris Fonnesbeck fonnesb...@gmail.com wrote: I'm hoping someone with some experience generating tables in Sweave will be able to solve this problem for me. I'm experiencing some inconsistency with the way floating point numbers are

[R] Parsing a Simple Chemical Formula

2010-12-26 Thread Bryan Hanson
then do the math on. Here's hoping this is a simple issue for more experienced R users! TIA, Bryan *** Bryan Hanson Professor of Chemistry Biochemistry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Parsing a Simple Chemical Formula

2010-12-26 Thread Bryan Hanson
thanks to each of you! Bryan On Dec 26, 2010, at 7:26 PM, Gabor Grothendieck wrote: On Sun, Dec 26, 2010 at 6:29 PM, Bryan Hanson han...@depauw.edu wrote: Hello R Folks... I've been looking around the 'net and I see many complex solutions in various languages to this question, but I have

Re: [R] Parsing a Simple Chemical Formula

2010-12-26 Thread Bryan Hanson
. Hope this helps. Spencer On 12/26/2010 5:01 PM, Bryan Hanson wrote: Well let me just say thanks and WOW! Four great ideas, each worthy of study and I'll learn several things from each. Interestingly, these solutions seem more general and more compact than the solutions I found

Re: [R] Parsing a Simple Chemical Formula

2010-12-26 Thread Bryan Hanson
recommendations. Thanks again, Bryan On Dec 26, 2010, at 10:21 PM, David Winsemius wrote: On Dec 26, 2010, at 8:28 PM, Bryan Hanson wrote: Thanks Spencer, I'll definitely have a look at this package and it's vignettes. I believe I have looked at it before, but didn't catch

[R] Package build/check OK, install looking for irrelevant function

2011-11-09 Thread Bryan Hanson
doesn't produce anything recent. I've restarted my computer and upgraded to the latest patched R. Problem remains. This was not occurring last weekend, but I'm not sure how I might have caused it. Session info further down. Any help appreciated. Bryan *** Bryan Hanson Professor

Re: [R] ggplot2 - regression statistics how to display on plot

2011-11-10 Thread Bryan Hanson
Jim, you can use the function appended below, which is part of package HandyStuff. If you want an example, see ?lmEqn after installing HandyStuff, available at github.com/bryanhanson/HandyStuff. Bryan lmEqn - function(df = NULL, y = NULL, x = NULL, method = lm, leg.loc = c(0, 0),

Re: [R] 2^k experiment generator

2011-11-13 Thread Bryan Hanson
Check out the Task View on Experimental Design: http://cran.at.r-project.org/web/views/ExperimentalDesign.html but perhaps packages rsm or qualityTools have what you want. Bryan *** Bryan Hanson Professor of Chemistry Biochemistry DePauw University On Nov 13, 2011, at 9:25 AM

  1   2   >