Re: [R] R and Interactive Visualizations

2013-11-22 Thread Bryan Hanson
I think you will need to do this in a web page running java. So you need a way to link your R stuff to java, possibly back and forth depending upon exactly what you end up doing. You've found some pages already. But look also at shiny and d3. http://www.rstudio.com/shiny/ http://d3js.org/

Re: [R] R packages for CAT scans

2013-09-18 Thread Bryan Hanson
Check here: http://cran.r-project.org/web/views/MedicalImaging.html Bryan On Sep 18, 2013, at 7:56 AM, wwreith reith_will...@bah.com wrote: Does anyone know of a package that would allow data from a CT scan to be loaded into R? Thanks! -- View this message in context:

Re: [R] (no subject)

2013-07-15 Thread Bryan Hanson
Look at the package chemometrics, it can certainly handle your number of variables (p n is what that's called and it requires special considerations). I don't recall about missing values. The authors of that package also have a very helpful text. Good Luck. Bryan On Jul 14, 2013, at 10:50

Re: [R] Issue with Imports in NAMESPACE

2013-06-25 Thread Bryan Hanson
By chance is any of this related to what I'll call the 'depends relay' discussed in this SO post? http://stackoverflow.com/a/8638902/633251 (see the 'caveat' to Josh O'Brien's answer, which also links back to another answer by Martin Morgan). This issue has happened to me and the symptoms are

[R] Proper way to implement package internal functions

2013-06-12 Thread Bryan Hanson
[previously posted on Stack Overflow: http://stackoverflow.com/questions/17034309/hiding-undocumented-functions-in-a-package-use-of-function-name ] I've got some functions I need to make available in a package, and I don't want to export them or write much documentation for them. I'd just hide

Re: [R] Proper way to implement package internal functions

2013-06-12 Thread Bryan Hanson
have documentation entries. if I understand correctly. I guess the reason I didn't find any documentation is the wide lattitude which is possible. Thank you. Bryan On Jun 12, 2013, at 10:57 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 12/06/2013 10:44 AM, Bryan Hanson wrote

[R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Bryan Hanson
grDevices::convertColor has arguments 'from' and 'to' which can take on value 'XYZ'. Can someone confirm that 'XYZ' is the same as the CIE chromaticity coordinates that are also sometimes refered to as 'xyY' in the literature? Or are these the CIE tristimulus values? It looks to me like the

Re: [R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Bryan Hanson
it looks like D65, a white standard, does not come back to something near white in the sRGB space. What am I doing wrong here, or what do I misunderstand? Please don't say everything! Thanks, Bryan On Jun 12, 2013, at 2:57 PM, Ken Knonlauch ken.knobla...@inserm.fr wrote: Bryan Hanson hanson

Re: [R] grDevices::convertColor XYZ space is it really xyY?

2013-06-12 Thread Bryan Hanson
something like this D65 - c(0.3127, 0.329, 0.3583) X - 100 * D65[1] Y - 100 * D65[2] Z - 100 * D65[3] XYZ - data.frame(X = X, Y = Y, Z = Z) convertColor(XYZ, from = XYZ, to = sRGB) [,1] [,2] [,3] [1,]111 Quoting Bryan Hanson han...@depauw.edu: Ken, I followed

Re: [R] Proper way to implement package internal functions

2013-06-12 Thread Bryan Hanson
: On 13/06/13 03:34, Bryan Hanson wrote: SNIP So this warning from check is not a problem in the long run: * checking for missing documentation entries ... WARNING Undocumented code objects: ‘ang0to2pi’ ‘dAB’ ‘doBoxesIntersect’ ... All user-level objects in a package should have

[R] rgl crashes after one successful draw

2013-05-29 Thread Bryan Hanson
This is really odd, and probably 100% local to me, but I'm at a loss as to a next step. After narrowing things down, here's how to reproduce: library(rgl) showSomething - function() { open3d() points3d(rnorm(10),rnorm(10),rnorm(10)) axes3d()

Re: [R] rgl crashes after one successful draw

2013-05-29 Thread Bryan Hanson
on X11 and one on Apple's GL. In particular, are you using command-line R or R.app? I seem to be able to reproduce it using R.app, in which case it is most definitely for R-sig-mac, and a workaround is to use command-line R. On 29/05/2013 15:11, Bryan Hanson wrote: This is really odd

Re: [R] Linebreaks in cat() functions that call other variables?

2013-05-22 Thread Bryan Hanson
The only permutation you likely didn't try: cat(df(between) is, a[1,1], \ndf(within) is, a[2,1]) \n has to be inside the quotes. HTH. Bryan On May 22, 2013, at 4:34 PM, jordanbrace r24...@mun.ca wrote: Hi everyone, I'm having some difficulty getting the linebreaks I want with the cat()

Re: [R] Image segmentation

2013-04-06 Thread Bryan Hanson
I've recently had a reason to work a little with image segmentation too, and in addition to EBImage, you should look at biOps. You can learn a lot by studying these packages. Bryan On Apr 6, 2013, at 10:04 AM, Eder Paulo eder...@hotmail.com wrote: Hello, Thanks for replying me! I was

Re: [R] plotting CIE chromaticity diagram?

2013-03-18 Thread Bryan Hanson
my not quite perfect attempt a little later today. Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University Greencastle IN 46135 USA academic.depauw.edu/~hanson/deadpezsociety.html github.com/bryanhanson academic.depauw.edu/~hanson/UMP/Index.html On Mar 18

Re: [R] plotting CIE chromaticity diagram?

2013-03-18 Thread Bryan Hanson
I am, unfortunately, well-aware of the limitations that Ken points out (and I do appreciate him making these points). One can readily demonstrate the gamut limitations by printing the diagram Ishida links to on different devices. My hope is to get something close and include a disclaimer.

Re: [R] OrgMassSpecR peak area issue

2013-03-18 Thread Bryan Hanson
If you type DrawChromatogram you can see the method used to calculate the peak area. Looks to me like you could easily hack it if you wanted. The relevant part about peak areas is this: for (j in 1:n) { k - (j%%n) + 1 x[j] - peakTime[j] * peakIntensity[k] -

Re: [R] Fitting this data with a gaussian would be great

2013-02-23 Thread Bryan Hanson
Fortune candidate? I hear the landlord is hell, but the company good. Bryan I've already got an apartment reserved for me in one of Pat Burns's R Inferno levels, and I don't want to descend even further. Best, Bert __ R-help@r-project.org

Re: [R] R calculates small numbers, where the result should be zero

2012-09-11 Thread Bryan Hanson
This is the result of how any computer program stores numbers, it's not unique to R. A slightly different question is discussed in R FAQ 7.31 but it applies to your situation. You may also enjoy the R Inferno at www.burns-stat.com/pages/Tutor/R_inferno.pdf Bryan *** Bryan Hanson

Re: [R] How can I declutter/make a biplot less messy in R

2012-06-18 Thread Bryan Hanson
Don't do the biplot. Darn hard to make sense of anyway. Plot the scores and the loadings separately. You can see how to do that in this thread: http://r.789695.n4.nabble.com/How-to-plot-PCA-output-td4614732.html Good Luck. Bryan *** Bryan Hanson Professor of Chemistry Biochemistry

Re: [R] Reading a bunch of csv files into R

2012-05-28 Thread Bryan Hanson
OK, a couple of things (I only looked through quickly): 1. R doesn't allow variable names to begin with a number. Be sure you don't try that. 2. What's the overall goal here? Read them in, change the name, then write them out? Let us know and it will be easier to help you. 3. Regardless

Re: [R] Reading a bunch of csv files into R

2012-05-28 Thread Bryan Hanson
Thank you so much for your prompt reply! Please see my responds below under = in your reply... Many thanks again! HJ On Mon, May 28, 2012 at 4:45 PM, Bryan Hanson han...@depauw.edu wrote: OK, a couple of things (I only looked through quickly): 1. R doesn't allow variable

Re: [R] Reading a bunch of csv files into R

2012-05-25 Thread Bryan Hanson
HJ, try something like this: files - list.files(pattern = \\.(csv|CSV)$) for (i in 1:length(files)) { temp - read.csv(files[i], header = FALSE) ... do whatever you want with the contents of temp... } Bryan *** Bryan Hanson Professor of Chemistry Biochemistry

Re: [R] How to interpret an ANOVA result?

2012-05-15 Thread Bryan Hanson
mind. Here it is. It might be pretty much self-explanatory, if not, try ?aov and ?TukeyHSD for details. Maybe it answers your questions about why things are significant or not. Hopefully I didn't misunderstand your questions. Good Luck. Bryan *** Bryan Hanson Professor of Chemistry

Re: [R] How to plot PCA output?

2012-05-08 Thread Bryan Hanson
[...] But having indicated that I don't see a biplot's multiple scales as particularly likely to confuse or mislead, I'm always interested in alternatives. The interesting question is 'given the same objective - a qualitative indication of which variables have most influenced the location

Re: [R] How to plot PCA output?

2012-05-07 Thread Bryan Hanson
*** Bryan Hanson Professor of Chemistry Biochemistry DePauw University On May 7, 2012, at 6:22 AM, Christian Cole wrote: I have a decent sized matrix (36 x 11,000) that I have preformed a PCA on with prcomp(), but due to the large number of variables I can't plot the result with biplot(). How

Re: [R] How to plot PCA output?

2012-05-07 Thread Bryan Hanson
On 07/05/2012 14:36, Bryan Hanson han...@depauw.edu wrote: Christian, is that 36 samples x 11K variables? Sounds like it. Is this spectroscopic data? In any case, the scores are in the list element $x as follows: answer - prcomp(your matrix) answer$x contains the scores, so if you want

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

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] Mac shortcut for running a script

2011-12-13 Thread Bryan Hanson
For just running a single line? apple-return Bryan On Dec 13, 2011, at 10:19 AM, asafw wrote: Hi, I wonder if there is a mac equivalent to ctrl+r shortcut for running a script line.. (I am using MAC OS X 10.7.2). I saw this post

Re: [R] nipals in the chemometrics package in R

2011-12-01 Thread Bryan Hanson
details about what you are doing. Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University Greencastle IN 46135 USA academic.depauw.edu/~hanson/deadpezsociety.html github.com/bryanhanson academic.depauw.edu/~hanson/UMP/Index.html On Dec 1, 2011, at 6:51 AM, zz dd

Re: [R] Writing a function, want a string argument to define the name of the excel sheet to be called

2011-12-01 Thread Bryan Hanson
Sure, change your example as follows and then you can pass the name properly: foo - function(x,y,NAME = filename.csv){ #make a matrix with x rows and y cols M - matrix(nrow=x,ncol=y) #write the matrix write.table(M, file = NAME,append=TRUE, sep = ,) } Bryan Prof. Bryan Hanson

[R] [R-pkgs] Package HiveR 0.1-4 Released

2011-11-21 Thread Bryan Hanson
in speed for 3D plots. Please do let me know if you have questions, feature requests or find problems. Thanks, Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University Greencastle IN 46135 USA academic.depauw.edu/~hanson/deadpezsociety.html github.com/bryanhanson

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

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),

[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

[R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
connected by a right arrow. TIA, these things always elude me. Bryan *** Bryan Hanson Professor of Chemistry Biochemistry DePauw University xlab1 -expression(paste(Phase Angle , phi, Neat-O)) xlab2 - expression(paste(treatment: low stress, high stress, sep = %-%)) xlab3

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
to become decent at it. Thanks again. Bryan On Jun 22, 2011, at 8:49 PM, David Winsemius wrote: On Jun 22, 2011, at 8:10 PM, Bryan Hanson wrote: Hello R Masters and the Rest of Us: The first of these works fine, the 2nd is accepted but too literal (the %-% is shown in the plot label

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-23 Thread Bryan Hanson
suppose it will work. I'll try it out. Further suggestions welcome. Thanks, Bryan On May 20, 2011, at 8:24 PM, Patrick Connolly wrote: On Fri, 20-May-2011 at 02:05PM -0400, Bryan Hanson wrote: Hello Kindred R Spirits... I'm trying to get a file (csv) from Dropbox using their shareable link

[R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Bryan Hanson
suggestions. Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University Greencastle IN 46135 USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-20 Thread Bryan Hanson
it will work. I'll try it out. Further suggestions welcome. Thanks, Bryan On May 20, 2011, at 8:24 PM, Patrick Connolly wrote: On Fri, 20-May-2011 at 02:05PM -0400, Bryan Hanson wrote: Hello Kindred R Spirits... I'm trying to get a file (csv) from Dropbox using their shareable link concept

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

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

2011-03-11 Thread Bryan Hanson
Willi, try this: install.packages(sos) library(sos) findFn(L1 norm regression) I find 34 hits but you'd have to look them over to see if any of them are the sort of thing you want. HTH, Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University 602 S

Re: [R] The L Word

2011-02-24 Thread Bryan Hanson
mentioned. Of course, it could be somewhere else. But, the concept is pretty straightfoward. Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University 602 S. College Ave Greencastle IN 46135 USA On Feb 24, 2011, at 3:13 AM, Tal Galili wrote: Thank you all

Re: [R] question regarding basic stat question

2011-02-22 Thread Bryan Hanson
Daniel, how is the data stored? The answer to your question may be as simple as df - read.csv(filename.csv) summary(df) See ?read.csv for info on reading various file formats. HTH, Bryan Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University 602 S. College

Re: [R] Function to locate points in 3d octants or points on two axes

2011-02-02 Thread Bryan Hanson
Thanks Petr, the sign function will be of help. I was not aware of it. Bryan On Feb 2, 2011, at 3:21 AM, Petr Savicky wrote: On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: [Sorry, resending with a proper subject line!] Hi Guru's... I have a set of points that may lie

[R] General Solution to Drawing a Spline Curve in 3d?

2011-02-02 Thread Bryan Hanson
or xspline. What I'm trying to do is related to the idea of great circles, as implemented in package geosphere, but the curves I'd like to draw are not on the surface of a sphere nor are they parts of a circle. Thanks for any suggestions! Bryan *** Bryan Hanson Professor

Re: [R] Function to locate points in 3d octants or points on twoaxes

2011-02-02 Thread Bryan Hanson
Of Bryan Hanson Sent: Wednesday, February 02, 2011 5:23 AM To: Petr Savicky Cc: r-help@r-project.org Subject: Re: [R] Function to locate points in 3d octants or points on twoaxes Thanks Petr, the sign function will be of help. I was not aware of it. Bryan On Feb 2, 2011, at 3:21 AM, Petr Savicky

[R] Function to

2011-02-01 Thread Bryan Hanson
might be part of this, but I'm a little rusty on how to apply it. I hope this is clear enough, and someone has a suggestion to point me in the right direction. Before writing my own klunky version, I thought I'd ask. Thanks, Bryan Prof. Bryan Hanson Dept of Chemistry

[R] Function to locate points in 3d octants or points on two axes

2011-02-01 Thread Bryan Hanson
Prof. Bryan Hanson Dept of Chemistry Biochemistry DePauw University 602 S. College Ave Greencastle IN 46135 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

[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

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

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

[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

[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

[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

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

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

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

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

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

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

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

[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

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

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

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

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

  1   2   >