Re: [R] Reading data

2009-09-25 Thread Michael A. Miller
Sometimes it is easiest to open a file using a file selection widget. I keep this in my .Rprofile: getOpenFile <- function(...){ require(tcltk) return(tclvalue(tkgetOpenFile())) } With this you can find your file and open it with rel <- read.table(getOpenFile(), quote="", header=FALSE, s

Re: [R] Selecting groups with R

2009-08-24 Thread Michael A. Miller
To drop empty factor levels from a subset, I use the following: a.subset <- subset(dataset, Color!='BLUE') ifac <- sapply(a.subset,is.factor) a.subset[ifac] <- lapply(a.subset[ifac],factor) Mike > dataset Color Score 1 RED10 2 RED13 3 RED12 4 WHITE22 5 WHITE27 6 WHIT

Re: [R] OK - I got the data - now what? :-)

2009-07-08 Thread Michael A. Miller
> Mark wrote: > Currently my data is one experiment per row, but that's > wasting space as most experiments only take 20% of the row > and 80% of the row is filled with 0's. I might want to make > the array more narrow and have a flag somewhere in the 1st > 10 columns that

Re: [R] Using 'aggregate' when dependent on row value increments

2009-04-30 Thread Michael A. Miller
> "jim" == jim holtman writes: > Is this what you want: >> aggregate(x$Sim_1986, list(trunc(x$Latitude)), mean) > Group.1 x 1 82 55.04276 2 83 60.26186 3 84 39.40297 4 85 > 22.12000 >> You could also use cut to convert Latitude to a factor: aggregate(x$Sim_1986, cut(

Re: [R] nls factor

2009-04-15 Thread Michael A. Miller
> "Manuel" == Manuel Morales writes: > nls(y ~ a[fac]*x^b, start=list(a=c(1,1), b=0.25)) Did you mean a[f]? nls(y ~ a[f]*x^b, start=list(a=c(1,1), b=0.25)) Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] R on netbooks et al?

2009-03-06 Thread Michael A. Miller
> "Liaw," == Liaw, Andy writes: > Are you sure that's dual atoms? AFAIK it has a single Atom > N270 (single core) at 1.6GHz. With hyper-threading, you > may see "two cpus". Yep - that is exactly what is going on. Mike __ R-help@r-pr

Re: [R] Inference for R Spam

2009-03-05 Thread Michael A. Miller
cs, but then it is not physics. And if our goal is to do physics, then we aught to get back to the lab and observe reality some more. Which is where the fun is for many of us scientists! Regards, Mike -- Michael A. Miller mmill...@iupui.edu Department of Radiology

Re: [R] R on netbooks et al?

2009-03-05 Thread Michael A. Miller
> "Jim" == Jim Lemon writes: > I've got R on my little EeePC as well. Great for most jobs > and I highly recommend a DC/DC convertor for plugging into > your car's cigarette lighter to get around the crap battery > problem. I run R on my Eee PC as well - no problems there. A

Re: [R] Inference for R Spam

2009-03-04 Thread Michael A. Miller
>>>>> "Rolf" == Rolf Turner writes: > On 4/03/2009, at 11:50 AM, Michael A. Miller wrote: >> Sports scores are not statistics, they are measurements >> (counts) of the number of times each team scores. There >> is no

Re: [R] Inference for R Spam

2009-03-03 Thread Michael A. Miller
t not be significant, but relevant. I > tend to argue the other way round though, in medical > statistics. Sports scores are not statistics, they are measurements (counts) of the number of times each team scores. There is no sampling and vanishingly small possibility of systematic error in th

Re: [R] connecting boxplots

2009-01-12 Thread Michael A. Miller
> johnhj wrote: > Can you also describe me how to describe the standard > deviation of the boxplots/matrices ? Try tapply: > x <-read.table(file="test.txt") > x$group <- rep(1:8, each=5) > boxplot(V3~gruppe, data=x) with(x, tapply(V3, gruppe, sd)) Mike

Re: [R] Bug in "is" ?

2008-09-26 Thread Michael A. Miller
> Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > but it does seem to be a wrong decision for a language > focused mostly with statistical computations and not > computer science concerned with how to represent an > integer. The key word here is "computations." And after read

Re: [R] pairwise.t.test for paired data

2008-04-07 Thread Michael A. Miller
> "Peter" == Peter Dalgaard <[EMAIL PROTECTED]> writes: > (Oddly enough, this issue hasn't come up in the 6+ years > that the function has existed, and then it pops up twice > with little over a week between, see the thread started by > James Root on March 26.) Odd indeed - th

Re: [R] generating a paired t-test with multiple levels of a factor

2008-03-27 Thread Michael A. Miller
> "James" == James Root <[EMAIL PROTECTED]> writes: > Is there a way to run all paired t-tests where a paired > t-test is run for every possible combination? Sounds like pairwise.t.test is the sort of thing you are looking for... Mike __ R

Re: [R] Highlighting different series with colors

2008-02-26 Thread Michael A. Miller
> "Valentin" == Valentin Bellassen <[EMAIL PROTECTED]> writes: > Hello, I have a data frame with 3 vectors $x, $y, and > $type. I would like to plot $x~$y and having different > colors for the corresponding points, one for each level of > $type. Would someone know how to do tha

Re: [R] History of R

2008-02-22 Thread Michael A. Miller
ole in my adopting R is the ability to create excellent graphics. Every few years I used to do a search to find better tools for analysis and graphics - I haven't felt the need to repeat that since I found R. Mike -- Michael A. Miller [EMAIL PROTECTED] Imagi

Re: [R] 4 dimensional graphics

2008-01-11 Thread Michael A. Miller
is to make something like scatterplot3d(lat, long, > height) with points set according to a value. This is a bit heretical for this list, but have you looked into non-R things like paraview? (www.paraview.org) Mike -- Michael A. Miller [EMAIL PROTECTED]

Re: [R] An "R is slow"-article

2008-01-09 Thread Michael A. Miller
> "Paul" == Paul Gilbert <[EMAIL PROTECTED]> writes: > Gustaf Rydevik wrote: >> The author also have some thought-provoking opinions on R >> being no-good and that you should write everything in C > People used to say assembler, that's progress. >From the FORTRAN Preliminary

[R] creating a factor from dates by subject?

2007-12-20 Thread Michael A. Miller
s sort of thing all the time and it feels crufty to me. Thanks, Mike -- Michael A. Miller [EMAIL PROTECTED] Imaging Sciences, Department of Radiology, IU School of Medicine "ID","date","session" 1,05/24/2006,1 1,02/01/2007,2 1,

Re: [R] Looped t.test results according to a subset variable

2007-10-23 Thread Michael A. Miller
Does pairwise.t.test, with paste(group, quiz) as the factor, do what you are looking for? Regards, Mike -- Michael A. Miller [EMAIL PROTECTED] Imaging Sciences, Department of Radiology, IU School of Medicine __ R-help