Re: [R] unexpected behavior in bwplot

2005-07-12 Thread Greg Snow
the new function find the non-exported functions). Hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Ritter, Christian C GSMCIL-GSTMS/2 [EMAIL PROTECTED] 07/12/05 05:08AM R-2.1.1 on windows XP I just noticed

Re: [R] How to use the function plot as Matlab?

2005-07-13 Thread Greg Snow
=''), file=pipe) invisible() } Hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

[R] New Package: TeachingDemos

2005-07-14 Thread Greg Snow
or improvements on the current ones. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Is it possible to create highly customized report in *.xls format by using R/S+?

2005-07-20 Thread Greg Snow
See: http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html and http://www.stat.uiowa.edu/~jcryer/JSMTalk2001.pdf Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Wensui Liu [EMAIL PROTECTED] 07/19/05 03:22PM I

Re: [R] maps and data for german federal states

2005-07-20 Thread Greg Snow
There are shapefiles for Europe (and other places) at: http://www.vdstech.com/map_data.htm (there are 16 polygons withing the one for Germany, is that enough detail). You can read and plot the shapefiles using the maptools package. hope this helps, Greg Snow, Ph.D. Statistical Data Center

Re: [R] Is it possible to create highly customized report in *.xls format by using R/S+?

2005-07-20 Thread Greg Snow
. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Wensui Liu [EMAIL PROTECTED] 07/20/05 08:55AM I appreciate your reply and understand your point completely. But at times we can't change the rule, the only choice is to follow the rule

Re: [R] alaska map?

2005-07-26 Thread Greg Snow
Look at: http://www.census.gov/geo/www/cob/bdy_files.html There are shapefiles of the 50 states there, outlines, counties, and others. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Caitlin Burgess [EMAIL PROTECTED] 07/25

Re: [R] Adding Functionality to stat.table in Epi

2005-08-09 Thread Greg Snow
After you copy stat.table to stat.table2 and modify stat.table2 try: environment(stat.table2) - environment(stat.table) (you should only need to do that 1 time after creating/editing stat.table2). hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health

Re: [R] HPD credible sets

2005-08-12 Thread Greg Snow
There are 2 very basic functions in the package TeachingDemos. They only work on univariate unimodal (single interval) situations. There is also a function in the boa package, but I don't know anything about that one. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health

[R] rgui on windows quiting automatically

2005-08-22 Thread Greg Snow
will be appreciated, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] How to add legend of plot.Design function ( method=image)? (if (!.R.) )

2005-08-22 Thread Greg Snow
Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Frank E Harrell Jr [EMAIL PROTECTED] 08/22/05 03:15PM Jan Verbesselt wrote: [snip discussion of subplot not being in R] While R does not have the subplot function

Re: [R] Plotting using image files

2005-08-23 Thread Greg Snow
) x - runif(10,3,6) y - runif(10,100,200) plot(x,y, type='n') cp - par(no.readonly=TRUE) tmp - cnvrt.coords(x,y) for (i in 1:10){ par(plt=c(tmp$dev$x[i] + c(-0.03,0.03), tmp$dev$y[i] + c(-0.03,0.03)), new=TRUE) plot(logo) } par(cp) hope this helps, Greg Snow, Ph.D. Statistical Data

[R] rgui on windows quiting automatically Resolved

2005-08-25 Thread Greg Snow
that file then everything started working fine again. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] interactive time series plot

2005-08-29 Thread Greg Snow
and move the window based on the keyboard input. hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Chris Paulse [EMAIL PROTECTED] 08/29/05 12:03PM Hi, I've written the following function to display small windows

Re: [R] generating a vector from clusters of logicals

2005-09-08 Thread Greg Snow
Try: x - c(TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,TRUE,TRUE) tmp - rle(x) tmp$values - seq(along=tmp$lengths) new.x - inverse.rle(tmp) new.x Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Troels Ring [EMAIL PROTECTED] 09/08/05 03

Re: [R] Reading data from a serial port

2005-09-13 Thread Greg Snow
I don't know of a specific package, but there is support for various connections in R. look for help on connections by typing: ?connection There is also a section in the R Data Import/Export document on connections. You will probably use a fifo or a pipe. Good luck, Greg Snow, Ph.D

Re: [R] how to extract the column name or value from the numerical value of the matrix

2005-09-19 Thread Greg Snow
look at ?col and ?row. One way to use them is: col(A)[A==11] row(A)[A==14] hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 shanmuha boopathy [EMAIL PROTECTED] 09/19/05 01:30PM Dear sir, i have a matrix like

Re: [R] Neat way of using R for pivoting?

2005-09-20 Thread Greg Snow
(www.yarr.org.uk). R fits in very well: I be usin' Arrrgg for my post processin'. Keith Bannister Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list

Re: [R] Neat way of using R for pivoting?

2005-09-20 Thread Greg Snow
. Burns has already posted the url that contains another of my experiances with intelligent people getting caught in one of Excel's traps (and yes Excel has a feature that would have prevented the trap, but Excel convieniently hid the need to use it). Greg Snow, Ph.D. Statistical Data Center, LDS

Re: [R] controlling usage of digits scientific notation in R plots; postscript margins

2005-09-21 Thread Greg Snow
, 1:10, xaxt='n') axis(1, at=(1:10)*1e+5, labels=paste( 1:10, *10^5, sep='')) also look at ?plotmath if you want actual superscripts. Hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Paul Johnson [EMAIL PROTECTED

Re: [R] Automatic creation of file names

2005-09-22 Thread Greg Snow
look at the g.data package, it provides methods for automatically saving and loading datasets. Another option for creating filenames is the tempfile command. hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Leite

Re: [R] R and Data Storage

2005-10-03 Thread Greg Snow
You might want to look at sqlite (http://www.sqlite.org/). There is already an R package for accessing these databases and the website shows some GUI interfaces that may be easy enough for tha casual user. Best of all it is small, quick, free, and open source. Greg Snow, Ph.D. Statistical Data

Re: [R] permutational Kolmogorov-Smirnov p-value for paired data

2005-10-11 Thread Greg Snow
)$statistic out - replicate(1000, perm1(my.x,my.y) ) hist(out) abline(v=mystat) mean(out mystat) hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 John Chen [EMAIL PROTECTED] 10/07/05 06:05AM Dear List, I am new to R

Re: [R] Any way to add to data frame saved as .rData file?

2005-10-13 Thread Greg Snow
Have you looked at the g.data package? It might be useful (but may still require some redesign of your dataset). Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Ken Termiso [EMAIL PROTECTED] 10/13/05 08:14AM I'd put

Re: [R] shell scripts in R

2005-10-14 Thread Greg Snow
inaccurate, after all you could do the following: tmp - paste(letters[ c(12,19)], collapse='') system(tmp,show=T) here tmp is a string and works, but quoting it would break things. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408

Re: [R] how to use large data set ?

2006-07-19 Thread Greg Snow
You did not say what analysis you want to do, but many common analyses can be done as special cases of regression models and you can use the biglm package to do regression models. Here is an example that worked for me to get the mean and standard deviation by day from an oracle database with over

Re: [R] RfW 2.3.1: regular expressions to detect pairs of identical word-final character sequences

2006-07-25 Thread Greg Snow
Using regular expression matching for this case may be overkill (the RE engine will be doing a lot of backtracking looking at a lot of non-matches). Here is an alternative that splits the text into a vector of words, extracts the last 2 letters of each word (remember if the last 3 letters match,

Re: [R] RfW 2.3.1: regular expressions to detect pairs of identical word-final character sequences

2006-07-25 Thread Greg Snow
-Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 11:41 AM To: Greg Snow Cc: Stefan Th. Gries; r-help@stat.math.ethz.ch Subject: Re: [R] RfW 2.3.1: regular expressions to detect pairs of identical word-final character sequences Regarding having

Re: [R] boxcox transformation

2006-07-31 Thread Greg Snow
boxcox from MASS and bct from TeachingDemos do different things. The boxcox function does not return the transformed y values, it returns log-likelihood values for various values of lambda, these values can be used to decide which value of lambda to use (generally it is used by giving a

Re: [R] placing rectangle behind plot

2006-07-31 Thread Greg Snow
One thing you could try (probably as last resort, if someone comes up with a better idea, use that) is to plot to an xfig device, then use xfig (or jfig) to move the rectangle to the back, then convert it to whatever final graphics format you want. -Original Message- From: [EMAIL

Re: [R] Power of a single sample binomial test

2006-07-31 Thread Greg Snow
It looks like the pwr.p.test function from the pwr package would do what you want. -Original Message- From: [EMAIL PROTECTED] on behalf of Chris Evans Sent: Sun 7/30/2006 12:53 PM To: r-help@stat.math.ethz.ch Subject: [R] Power of a single sample binomial test The only references to

Re: [R] rexp question

2006-08-15 Thread Greg Snow
Try: rexp(n=200*length(r), rate=rep(r, each=200) ) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Jones

Re: [R] lean and mean lm/glm?

2006-08-21 Thread Greg Snow
For very large regression problems there is the biglm package (put you data into a database, read in 500,000 rows at a time, and keep updating the fit). This has not been extended to glm yet. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] Producing R demos

2006-08-30 Thread Greg Snow
One option is to use VNC along with vncrec to do the recording (see the website: http://www.sodan.org/~penny/vncrec/). I think there are some other recorders also available for vnc, so you might try a google search. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] density() with from, to or cut and comparrison of density()

2006-08-30 Thread Greg Snow
You may want to look at the logspline package, it uses a different technique than density does, but it estimates densities and allows you to tell the routine that there is a minimum value and that the density does not extend beyond there. Hope this helps, -- Gregory (Greg) L. Snow Ph.D.

Re: [R] working with summarized data

2006-08-30 Thread Greg Snow
There are functions to do weighted summary statistics in the Hmisc package (wtd.quantile, ...). For more complicated analyses (but not plots yet) the biglm package has a bigglm function that expects the data in chunks, you could write a function that expand parts of the dataset at a time. Hope

Re: [R] Tables with Graphical Representations

2006-09-01 Thread Greg Snow
The LaTeX or other solutions suggested are probably best, but here is a way to do it using only R base graphics (the below code is to get you started, some graphical parameters need to be set to get the spacing to look better): tmp - structure(list(Cancer = structure(as.integer(c(19, 23, 22, 13,

Re: [R] reading images in R

2006-09-08 Thread Greg Snow
Look at the pixmap and rimage packages. -Original Message- From: [EMAIL PROTECTED] on behalf of Nair, Murlidharan T Sent: Thu 9/7/2006 3:38 PM To: r-help@stat.math.ethz.ch Subject: [R] reading images in R Are there functions to read image files in jpg, gif or even a pdf file?

Re: [R] unvector ?

2006-09-11 Thread Greg Snow
Try: paste(letters, collapse=' ') Or do.call('paste',as.list(letters)) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric

Re: [R] Gnuplot epslatex format also in R?

2006-09-13 Thread Greg Snow
There is a Java based implementation called jfig at: http://tams-www.informatik.uni-hamburg.de/applets/jfig/ that works on windows. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message-

Re: [R] Conservative ANOVA tables in lmer

2006-09-13 Thread Greg Snow
[snip] Douglas Bates wrote: Hmm - I'm not sure what confidence interval and what number of levels you mean there so I can't comment on that method. Suppose we go back to Spencer's example and consider if there is a signficant effect for the Nozzle factor. That is equivalent to the

Re: [R] R-question

2006-09-13 Thread Greg Snow
I don't believe that doing a direct SQL query on a native R object is currently possible, others have pointed out ways to do some of the things you would want SQL for using built-in R commands. If you really want to use SQL you could transfer the data frames you want to use to database tables,

Re: [R] Greedy triangulation

2006-09-14 Thread Greg Snow
Does the deldir package do what you want? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bebber Sent: Thursday, September 14, 2006

Re: [R] Standard error of coefficient in linear regression

2006-09-18 Thread Greg Snow
I believe that your confusion is due to a typo in the formula in [3], it is missing a sumation sign (and a subscript on x if you want to be picky). To get the denominator you subtract the mean of your x variable from all the x-values, square the differences, then sum them up (the missing

Re: [R] (no subject)

2006-09-18 Thread Greg Snow
You may want to rethink your whole approach here: 1. Pie charts are usually a poor choice of graph, there are better choices. 2. Adding percentages to a pie chart is a way of admitting that the pie chart is not doing the job. 3. If you want people to compare percentages, then a table is what is

Re: [R] Adding percentage to Pie Charts (was (no subject))

2006-09-19 Thread Greg Snow
To: r-help@stat.math.ethz.ch Subject: Re: [R] Adding percentage to Pie Charts (was (no subject)) Greg Snow Greg.Snow at intermountainmail.org writes: You may want to rethink your whole approach here: 1. Pie charts are usually a poor choice of graph, there are better choices. 2. Adding

Re: [R] Statistical data and Map-package

2006-09-26 Thread Greg Snow
You may also want to look at the maptools (and sp) package, it can read in and plot shapefiles from external sources. Some sources of maps that maptools can plot include: http://www.vdstech.com/map_data.htm http://openmap.bbn.com/data/shape/timezone/

Re: [R] sweave2html only for Linux users ?

2006-10-02 Thread Greg Snow
Another approach is to use the Sweave driver in the R2HTML package and work directly with HTML rather than converting. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL

Re: [R] Problem with rbinom

2006-10-02 Thread Greg Snow
Using read.table creates a data frame that you store in dataen, rbinom wants a vector not a data frame, so try: rbinom(4857,1,dataen$pd) Or rbinom(4857,1,dataen[[1]]) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED]

Re: [R] R Graphics: Saving PDF and other formats from Windows GraphicDevice for LaTeX

2006-10-04 Thread Greg Snow
If you plan to include your graphics in LaTeX files then you should really look at the Sweave function in the utils package. This approach may work better for you and make these questions not matter anymore. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] A more efficient code using whole object approach?

2006-10-04 Thread Greg Snow
A couple of thoughts (hopefully others will have even better suggestions): 1. Could you do a some of the computations on the log scale? This would turn exponents into multiplications and multiplications into additions and may turn a lot of the work into matrix multiplications. 2. It does not

Re: [R] lines at margin?

2006-10-09 Thread Greg Snow
The cnvrt.coords fnuction in the TeachingDemos package may simplify the procces of getting the coordinates. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED]

Re: [R] Interactive plots in R?

2004-11-23 Thread Greg Snow
/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] scatterplot of 100000 points and pdf file format

2004-11-24 Thread Greg Snow
just replace the initial plot with a hexbin or contour plot and you should have something that takes a lot less room but still shows the locations of the outer points. Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 __ [EMAIL

Re: [R] drawing a rectangle through multiple plots

2004-12-16 Thread Greg Snow
='') #bottom plot plot(1:10, rnorm(10), ylim=c(-4,4)) ### turn off clipping (alow drawn lines to cross all plots) par(xpd=NA) ### convert top to current usr coordinates tmp.y2 - cnvrt.coords(x=NA, y=tmp.y, input='dev')$usr$y # draw rectangle rect(2.5, -4, 4.5, tmp.y2) Hope this helps, Greg Snow

Re: [R] easing out of Excel

2005-01-20 Thread Greg Snow
-r.project.org/ and click on R web-servers under the Related Projects heading in the left column to get details. Hope this helps, Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https

Re: [R] German Map Data?

2005-03-03 Thread Greg Snow
There is a shapefile at: http://www.vdstech.com/map_data.htm The maptools package can read and plot shapefiles. Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 Werner Wernersen [EMAIL PROTECTED] 03/03/05 02:35PM Hello! Is there a more accurate map of germany than

Re: [R] Decimal point as a comma in postcript and pdf graphics

2005-03-09 Thread Greg Snow
in 2.1.0 (or at least be broken in new and interesting ways) due to support for UTF-8 encodings. Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] from long/lat to UTM

2005-03-10 Thread Greg Snow
the sapply was (under a second on my fairly fast pc (windows 2000)). It shouldn't be too hard to convert this into a more general function. Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 __ R-help@stat.math.ethz.ch mailing

Re: [R] mixtures as outcome variables

2005-03-23 Thread Greg Snow
for any hints! Jason -- Jason W. Martinez, Gradaute Student University of California, Riverside Department of Sociology E-mail: [EMAIL PROTECTED] hope this helps, Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111

Re: [R] Histogram over times (without dates)

2005-03-24 Thread Greg Snow
Have you looked at the CircStats and circular? They have some plotting functions that may be of help to you. Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 Dubravko Dolic [EMAIL PROTECTED] 03/24/05 09:38AM Dear Group, Having a character vector like this one

Re: [R] slide show with R

2005-03-29 Thread Greg Snow
- ... line it will pause and wait for you to press enter before continuing on. you can discuss the lines that have just been executed and the current plot, then press enter for the next chunk. hope this helps, Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 [EMAIL PROTECTED

Re: [R] how i can get input from user input

2005-03-30 Thread Greg Snow
Also look at ?readline Greg Snow, Ph.D. Statistical Data Center [EMAIL PROTECTED] (801) 408-8111 Uwe Ligges [EMAIL PROTECTED] 03/29/05 11:43PM Cuichang Zhao wrote: Hello, Could you please tell me how i can get an input from the user in R? Depends on the kind of input. See, e.g., ?scan

Re: [R] par(mfror=c(1,2))

2006-05-01 Thread Greg Snow
One simple solution is to use the layout function in place of par. For example: layout(rbind(c(0,1,1,0),c(0,2,2,0))) hist(rnorm(100)) hist(rnorm(1)) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111

Re: [R] sprintf question

2006-05-03 Thread Greg Snow
You could finagle things with do.call (maybe right your own function that does this if you will use it often). Here is your example: v - c(1, 2, -1.197114, 0.1596687) iv - c(3, 1, 2, 4) tmp - c(list(%9.2f\t%d\t%d\t%8.3f),as.list(v[iv])) do.call('sprintf',tmp) [1] -1.20\t1\t2\t 0.160

Re: [R] Non repetitive permutations/combinations of elements

2006-05-08 Thread Greg Snow
Try expand.grid: expand.grid( c(-1,1), c(-1,1), c(-1,1) ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nameeta Lobo Sent: Monday,

Re: [R] identify high dimension data point

2006-05-10 Thread Greg Snow
The tkBrush function in the TeachingDemos package may help. If you just want to see where a selected point apears in each of the pairwise plots based on selecting it in 1 plot then this function will do that for you (note it depends on having installed the tcltk package as well). If you need the

Re: [R] Can't there be a cd command?

2006-05-10 Thread Greg Snow
When talking about user friendlyness of computer software I like the analogy of cars vs. busses: Busses are very easy to use, you just need to know which bus to get on, where to get on, and where to get off (and you need to pay your fare). Cars on the other hand require much more work, you

Re: [R] text plots?

2006-05-12 Thread Greg Snow
There are some very basic interface functions to gnuplot in the TeachingDemos package that may make option 2 below a little quicker. Or even better you could expand them to work better. The following works on a single windows machine (don't have linux or a remote machine to test with):

Re: [R] Re : Large database help

2006-05-17 Thread Greg Snow
Thanks for doing this Thomas, I have been thinking about what it would take to do this, but if it were left to me, it would have taken a lot longer. Back in the 80's there was a statistical package called RUMMAGE that did all computations based on sufficient statistics and did not keep the actual

Re: [R] Negative value on ternaryplot

2006-05-18 Thread Greg Snow
There are also the functions: triangle.plot in package ade4, triplot in package TeachingDemos, tri in package cwhtool, and soil.texture in package plotrix. Perhaps one of these other functions will work better for you (all do the triangular plots, each with different bells and whistles). triplot

Re: [R] multiple plots with par mfg

2006-05-23 Thread Greg Snow
The following works for my quick tests, but being undocumented it is not guarenteed to work for all situations. The best thing to do is to create the first plot, add everything to the first plot that you need to, then go on to the 2nd plot, etc. If you really need to go back to the first plot

Re: [R] Statistical Power

2006-05-23 Thread Greg Snow
For other than the basic situations I generally use simulation to estimate power. Follow these basics steps: Write a function that takes as input the things that you may want to change in estimating power (sample size, effect size, standard deviations, ...). Inside the function generate random

Re: [R] shapes in rgl

2006-05-23 Thread Greg Snow
Try this function (and modify it to your hearts content): rgl.cones - function(x,y,z,h=1,r=0.25, n=36, ...){ r - rep(r, length.out=length(x)) h - rep(h, length.out=length(x)) step - 2*pi/n for (i in seq(along=x)){ for (j in seq(0, 2*pi-step, length=n)){ tmp.x - x[i] +

Re: [R] multiple destinations in duration (survival) analysis

2006-05-24 Thread Greg Snow
I have been working on a similar project and here is how I approached it (though I would be very happy to hear other ideas): Our situation was that we wanted to predict length of stay in the emergency room of the hospital, there are multiple competing places to go from the ER: released to go

Re: [R] Regression line limited by the rage of values

2006-05-24 Thread Greg Snow
For single lines the usual method is to just use the lines or segments function, however I have been thinking that there may be some other uses for clipping within a plot region when adding info (abline, but others as well). So here is a first stab at a function to clip within the region, it

Re: [R] Is there a way to draw 3d plot?

2006-05-26 Thread Greg Snow
There is also the rotate.persp function in the TeachingDemos package. It creates a set of slider bars that you can move with the mouse to change the different options to persp including the angles. It is not quite as convenient as clicking in the plot and dragging like rgl allows, but it does

Re: [R] missed ylim from plot.default

2006-05-26 Thread Greg Snow
Try the following function to see if it does what you want. The basic syntax for your example would be: tmp - squishplot( xlim=c(-0.5,7), ylim=c(-0.5,2.8), asp=1 ) plot(1:5, rep(1,5), xlim=c(-0.5,7), ylim=c(-0.5,2.8)) par(tmp) # reset plotting region for future plots The function definition

Re: [R] Is there a way to draw 3d plot?

2006-05-29 Thread Greg Snow
into the discussion, if you look at the help page for rotate.persp in the TeachingDemos package you will also see help for rotate.cloud and rotate.wireframe functions. -Original Message- From: Ritwik Sinha [mailto:[EMAIL PROTECTED] Sent: Mon 5/29/2006 9:19 AM To: Greg Snow Cc: R-help

Re: [R] line over multiplot

2006-05-29 Thread Greg Snow
It may be as simple as setting par(xpd=NA) see ?par for what that does. If you want more control (prevent the line from going through titles, etc) then look at the examples for the cnvrt.coords function in the TeachingDemos package. Hope this helps, -Original Message- From: [EMAIL

Re: [R] Nesting in Cox proportional hazards survivorship analysis

2006-05-31 Thread Greg Snow
The site/station syntax is mainly useful for situations where you have the same station id's withing different sites (e.g. there is a station #1 in site #1 and also a different station still labeled #1 within site #2). It is unclear whether you really need the /station part or not (it generally

Re: [R] follow-up

2006-05-31 Thread Greg Snow
To get the averages, look at ?tapply or ?aggregate To exclude parts of the data look at ?subset To remove the spaces in the lines around points look at ?matplot and ?plot specifically look for type='o' To add a legend look at ?legend. You may also want to look at the lattice package, using

Re: [R] plot with different color

2006-06-02 Thread Greg Snow
Here is one approach. It uses the function clipplot which is shown below (someday I will add this to my TeachingDemos package, the TeachingDemos package is required). An example of usage: x - rnorm(1:100) plot(x, type='l',col='red') clipplot( lines(x, col='blue'), ylim=c(-4,0) ) Hope this

Re: [R] Density Estimation

2006-06-07 Thread Greg Snow
Not a direct answer to your question, but if you use a logspline density estimate rather than a kernal density estimate then the logspline package will help you and it has built in functions for dlogspline, qlogspline, and plogspline that do the integrals for you. If you want to stick with the

Re: [R] data set size question

2006-06-14 Thread Greg Snow
If you need to analyze something bigger than memory can hold, one option is the biglm package which will fit linear regression models (and a lot of different analyses can be restructured as linear regression models) on blocks of data so that the entire dataset is not in memory all at the same

Re: [R] Change the range of a 'ternaryplot'

2006-06-19 Thread Greg Snow
Try the function triangle.plot from the ade4 package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martínez Ovando Juan Carlos

Re: [R] Plotting Upper triangle of Matrix with diagonal as the Base

2006-06-20 Thread Greg Snow
Try these functions (modify to suit your needs: tri1 - function(x){ n - dim(x)[2] for(i in n:1){ for( j in 1:(n-i+1) ){ cat(sprintf(' %5.2f',x[j,j+i-1])) } cat(\n) } } tri2 - function(x){ n

Re: [R] R Reporting - PDF/HTML mature presentation quality package?

2006-06-26 Thread Greg Snow
The R2HTML package does have a driver for sweave (see help for RweaveHTML). This allows you to write an HTML file and add the R commands you want (use =, @ combinations to indicate R commands and Sexpr r-code for inline replacement), then process it with sweave and have a final HTML file (and

Re: [R] Finding a color code.

2006-06-26 Thread Greg Snow
You can use the following: rgb(185, 35, 80, max=255) Which gives #B92350 Or if you want a color name, the closest I found is maroon which is red: 176, green: 48, blue: 96 Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED]

Re: [R] another tcl/tk query

2006-07-10 Thread Greg Snow
Try looking at the tkwait.window function, it may be what you need. Create your tkwindow with all its components, then call tkwait.window on the toplevel window and the calling function will wait until that window goes away before continuing execution. Hope this helps, -- Gregory (Greg)

Re: [R] Adding Lines to Plot

2006-07-10 Thread Greg Snow
There are a couple of different options that you can try (each generalize a bit differently to other situations). If you just want lines at the tick marks to go the entire width (and be generated automatically to match the labels), then look at ?par and look at 'tck', you can use this in the

Re: [R] R newbie: logical subsets

2006-07-12 Thread Greg Snow
Gabor, your solution does not take into account the groups. How about something like: iris2 - iris iris2$m - ave(iris2$Sepal.Length, iris2$Species) iris2$s - ave(iris2$Sepal.Length, iris2$Species, FUN=sd) iris2 - transform(iris2, z= (Sepal.Length-m)/s) iris2.2 - subset(iris2, abs(z) 2)

Re: [R] Output and Word

2006-07-18 Thread Greg Snow
Others have suggested using R2HTML (which is a good option). Another option is to use Sweave and specifically the new odfWeave package for R. This works on OpenOffice files rather than word files (but OpenOffice http://www.openoffice.org/ can inport and export word documents). The basic idea

Re: [R] dot diagram

2006-04-10 Thread Greg Snow
A basic implementation of this is the dots function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [R] Legend in the outer margin

2006-04-10 Thread Greg Snow
The cnvrt.coords function in the TeachingDemos package may be of help. Here is an example of possible use (just change the .9 and .7 to where ever on the page you want the legend): par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1) for (i in 1:9){ x - runif(25,1,10)

Re: [R] Exact quantile regression

2005-05-05 Thread Greg Snow
Here is an approach using optim: tmpfunc - function(param){ ml-param[1] sl-param[2] (qlnorm(.15,ml,sl)-10)^2 + (qlnorm(.5,ml,sl)-30)^2 } res - optim(c(1,2), tmpfunc) res - optim(res$par, tmpfunc) res hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS

Re: [R] Arranging Plots

2005-05-19 Thread Greg Snow
Using layout(matrix(c(1,1,2,2,0,3,3,0),2,3,byrow=TRUE)) may be closer to what the original intent was. Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Lapointe, Pierre [EMAIL PROTECTED] 05/19/05 05:51AM Try this: layout(matrix

Re: [R] us zipcode data map

2005-06-13 Thread Greg Snow
I have had success by downloading the zipcode (approximate) shapefiles (the .shp files) from: http://www.census.gov/geo/www/cob/z52000.html Then using the maptools package (rather than the maps package). hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain

Re: [R] Essay identification

2005-06-13 Thread Greg Snow
a copy to anyone who is interested (specify if you have perl, or need a stand alone copy (windows only)). hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 Werner Bier [EMAIL PROTECTED] 06/12/05 01:29PM Hi R-help

Re: [R] Generating correlated data from uniform distribution

2005-07-05 Thread Greg Snow
, new.point2, method=SANN, control = list(maxit=6, temp=200, trace=TRUE)) y - y[res$par] par(mfrow=c(2,2)) hist(x) hist(y) plot(x,y) cor(x,y) y - sort(y)[res2$par] par(mfrow=c(2,2)) hist(x) hist(y) plot(x,y) cor(x,y) Hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital

  1   2   3   4   >