Re: [R] Function to verify existence of an R object

2008-07-16 Thread Earl F. Glynn
"Judith Flores" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there a function to check if an object exists? ?exists efg Earl F Glynn Stowers Institute for Medical Research __ R-help@r-project.org

Re: [R] Colours in R

2008-07-17 Thread Earl F. Glynn
This page shows an R color chart and how to make one: http://research.stowers-institute.org/efg/R/Color/Chart/index.htm In particular, pp. 2-8 of this PDF shows the color name, hex value, and separate decimal RGB components: http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.

Re: [R] continuous coloring of a polygon

2008-08-15 Thread Earl F. Glynn
<- radius.outer * cos(theta) y.outer <- radius.outer * sin(theta) x.inner <- radius.inner * cos(theta) y.inner <- radius.inner * sin(theta) polygon(c(x.outer, rev(x.inner), x.outer[1] ), c(y.outer, rev(y.inner), y.outer[1] ) ) efg Earl F Glynn Stowers Institute for Medical Rese

Re: [R] How can I find nonstandard or control characters in a large file?

2013-12-10 Thread Earl F Glynn
r data and use sub/gsub or other tools to remove or alter problem characters. efg Earl F Glynn UMKC School of Medicine Center for Health Insights __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Converting decimal to binary in R

2013-12-16 Thread Earl F Glynn
11" > intToBin(65535) [1] "" > intToBin(65536) [1] "1" Earl F Glynn Principal Programmer/Analyst Center for Health Insights • University of Missouri – Kansas City __ R-help@r-project.o

[R] Help troubleshooting silent failure reading huge file with read.delim

2010-10-06 Thread Earl F. Glynn
s there some memory-related parameter that I should adjust that might explain the observed details above? Shouldn't read.delim catch this failure instead of being silent about dropping data? Thanks for any help with this. Earl F Glynn Overland Park, KS ___

Re: [R] Replacing a period in a string

2010-12-02 Thread Earl F Glynn
What about this? Remove the periods and change the "," to a ".": s <- "12.084.547,17" x <- as.numeric(gsub(',','\\.', gsub('\\.','',s))) options(digits=10) x Escaping periods is not-so-obvious. efg Earl F Glynn O

Re: [R] Colours for 3-way probabilities

2010-12-18 Thread Earl F Glynn
http://www.efg2.com/Lab/Graphics/Colors/HSV.htm. For info on R's hsv function: ?hsv This page shows the "hue" map of an RGB image: http://www.efg2.com/Lab/Graphics/Colors/ShowImage.htm See the Color Chart page above for a brief example of using R's rgb2hsv functi

Re: [R] Fortran and long integers

2011-02-06 Thread Earl F Glynn
4 is legal with your Fortran compiler: http://gcc.gnu.org/onlinedocs/gfortran/Old_002dstyle-kind-specifications.html#Old_002dstyle-kind-specifications efg Earl F Glynn Overland Park, KS __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Comparison between R and MATLAB

2008-06-20 Thread Earl F. Glynn
ow they license it. We are a non-profit, basic life scientific research institute and the Mathworks sells us the same license as for-profit businesses. Only degree-granting universities are eligible for academic pricing apparently. efg Earl F Glynn Bioinformati

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Earl F. Glynn
ode is also discouraged by "Code Complete 2". Again on p. 287: "Avoid the names of standard types, variables, and routines." If "hcl" is a "standard" routine, using "hcl" as a variable name in the same code example using the "hcl"

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Earl F. Glynn
"hadley wickham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, Jul 7, 2008 at 1:05 PM, Earl F. Glynn <[EMAIL PROTECTED]> > wrote: >> "hadley wickham" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED]

Re: [R] reading Excel file

2008-03-25 Thread Earl F. Glynn
X 1 NA 2 2 B 2008-03-02 14.76 Y 2 NA 3 3 C 2008-03-03 10.99 Z NA 1 4 4 D 2008-03-04 3.14NA 2 > class(d$Date) [1] "POSIXt" "POSIXct" efg Earl F. Glynn Bioinformatics Stowers Institute for Medi

Re: [R] Two datasets on one histogram

2008-04-02 Thread Earl F. Glynn
xlab="" ) lines(density(x2), col=2) lines(density(x3), col=3) # rug plots for displaying actual data points # you can add jitter() to rug() but with 1000 obs not much difference rug(x1, col=1, ticksize=0.01, line=2.5) rug(x2, col=2, ticksize=0.01, line=3.0) rug(x3, col=3

Re: [R] Nonlinear equation

2008-04-02 Thread Earl F. Glynn
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear R Users, > I'm trying to find function that allow me to solve one nonlinear equation. > Functions that I found are good for optimization problems. Perhaps try nlm or optim functions. Earl F. Glynn Bi

Re: [R] Arbitrary Precision Numbers

2008-04-10 Thread Earl F. Glynn
624386837205668069376 1366 The first few can be verified manually. -- efg Earl F. Glynn Bioinformatics Stowers Institute for Medical Research __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

Re: [R] hashmap in R

2008-05-08 Thread Earl F. Glynn
> names(x) <- c("a", "b", "c", "d") > x a b c d -1.4122868 1.3588267 -0.5499391 -0.3581889 > x["d"] d -0.3581889 efg Earl F Glynn Bioinformatics Stowers Institute for Medical Research

Re: [R] about col in heatmap.2

2007-12-03 Thread Earl F. Glynn
http://www.bme.unc.edu/research/Bioinformatics.FunctionalGenomics.html This looks like the MatLab palette that's in tim.colors: library(fields) # tim.colors: Matlab-like color palette N <- 100 par(lend="square") plot(rep(1,N), type="h", col=tim.colors(N), lwd=6, ylim=c(0,1))

Re: [R] Great looking plot - but what does it mean?

2008-01-07 Thread Earl F. Glynn
r a boxplot are actually buried in ?bxp instead of ?boxplot. To suppress the outlier, look in ?bxp and note that outpch=NA should get rid of the outlier points. efg Earl F. Glynn Stowers Institute for Medical Research __ R-help@r-project.org mailing li

Re: [R] Double integration - Gauss Quadrature

2008-09-29 Thread Earl F. Glynn
ny function evaluations. Formulas for those who may be interested: 1D Gauss-Legendre Quadrature 2D Gauss-Legendre Quadrature This can be extended to a 3D integral evaluations, too. efg Earl F Glynn Scientific Programmer Stowers Institute for Medical Research begin 666

Re: [R] Double integration - Gauss Quadrature

2008-09-29 Thread Earl F. Glynn
f unit circle = integral 0..2pi integral 0..1 r*dr *dTheta gauss_legendre2D(function(x,y) {x}, 0.0, 1.0, 0.0, 2*pi, nodes, weights) efg Earl F Glynn __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] Convert Binary to Decimal

2008-10-06 Thread Earl F. Glynn
valent. I have googled, but didn't find much in the way of > elegant solutions. Since you all were such a help last time, I figured I'd > ask you again. Try a Google search for: "Marc Schwartz" bin2dec efg Earl F Glynn Stowers Institute for Medical Research ___

Re: [R] Globbing Files in R

2008-12-22 Thread Earl F Glynn
ern="InPerson*") for (i in 1:length(ProcessList)) { filename <- ProcessList[i] . . . } efg Earl F Glynn Overland Park, KS __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide h

Re: [R] heatmap and legend

2008-01-29 Thread Earl F. Glynn
ductor package * heatmap_2 in Heatplus Bioconductor package efg Earl F. Glynn Bioinformatics Stowers Institute for Medical Research __ 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] R programming style

2008-02-11 Thread Earl F. Glynn
xis statement should have some sort of mnemonic definition, too, perhaps: axis(BOTTOM<-1, ...) But I believe I was ostracized in this E-mail list the last time I suggested such mnemonics instead of magic numbers. efg Earl F. Glynn Bioinformatics Stowers Institute for Medical Research ___

Re: [R] History of R

2008-02-19 Thread Earl F. Glynn
, but most of the analysis momentum was already for the use of R/Bioconductor. We casually looked at Octave a few times, but there was no strong attraction to use it. Some early tests showed no problems with computations using Octave, but showed some annoying issues with graphics that we didn't

[R] Anyone using R to study Twitter social networks?

2008-12-01 Thread Earl F Glynn
analysis in R? Just curious. Earl F. Glynn Overland Park, KS __ 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-guide.html and provide commented, min

[R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-17 Thread Earl F. Glynn
.org/useR-2008 . An automatic redirection link could be used so that www.r-project.org/useR-2008 is redirected to http://www.statistik.uni-dortmund.de/useR-2008/ for now, but once the conference is over the archive could be moved to www.r-project.org. Any comments? Just my $0.02, efg Earl F. Glynn

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
xpected format." When saving new Excel 2007 files, you can select "Save As" and "Excel 97-2003 Workbook" and use those .xls files like before with RODBC in R. But be careful using RODBC and Excel, such as this problem: RODBC and Excel: Wrong Data Type Assumed on Import http://

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Marc Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This might be a question along the lines of "is it plugged in?", but do > you have the Office 2007 version of the ODBC drivers installed? > > If not, then your results would not be a surprise. > > If you do, then we shou

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Earl F. Glynn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll try the odbcDriverConnect and let you know. Thanks. odbcDriverConnect worked fine for me, too, with new Excel 2007 formats: library(RODBC) channel <- odbcDriverConnect("DRIV

[R] Don't understand write.csv default: Why is column name for column of row names blank?

2007-10-31 Thread Earl F. Glynn
udge to put the column names in a new column one so they can have a column name too, and then suppress the row names in the write.csv. What am I missing? Is there an easy way to fill this blank field with a useful name for a database key when using write.csv defaults? Thanks for any insight

Re: [R] Don't understand write.csv default: Why is column name forcolumn of row names blank?

2007-11-01 Thread Earl F. Glynn
"Gabor Grothendieck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Would this be good enough: > > # example using builtin BOD data frame > write.csv(cbind(Z = row.names(BOD), BOD), row.names = FALSE) Thanks, Gabor, I like your solution better than mine. But, I still don't unders

Re: [R] question about running out of memory on R -- memory.limit change in R 2.6.0?

2007-11-06 Thread Earl F. Glynn
ly has a 2 GB address space? That is, the value returned by R 2.5.1 of 3145728000 wasn't strictly correct? efg Earl F. Glynn Scientific Programmer Stowers Institute __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

Re: [R] Discrimination of almost-random time series

2007-11-13 Thread Earl F. Glynn
paper: http://bioinformatics.oxfordjournals.org/cgi/content/abstract/bti789?ijkey=fD5aAeldrkzz765&keytype=ref efg Earl F. Glynn Scientific Programmer Stowers Institute for Medical Research __ R-help@r-project.org mailing list https://stat.ethz.ch/mai