[R] How should I organize data to compare differences in matched pairs?

2008-01-24 Thread Thomas Levine
ll of the duplicated information that the previous method has. Anyway, I'm sure someone's done this before, so I'd like to see what other people have done for data like these. Thomas Levine [[alternative HTML version deleted]] _

Re: [R] How should I organize data to compare differences in matchedpairs?

2008-01-24 Thread Thomas Levine
By accident, I didn't send this to the list. On Thu, 2008-01-24 at 17:54 -0500, Thomas Levine wrote: > Oh, right, I don't need the differences. I only needed to get the > differences before because I was doing them sloppily in a spreadsheet > and needed to do a t-test m

Re: [R] How should I organize data to compare differences in matchedpairs?

2008-01-25 Thread Thomas Levine
I have everything in the data frame now. The calculations I need to preform for each round are slightly different. How do I specify to make one calculation for one round and one for the other? (One round is called "C", and the other is "F") Thomas Levine On Thu, 2008-01-24 at

[R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Thomas Levine
I want to do something like this. avo(q~a+b+c+d+e+f+g+h+i+j+k+l) avo(r~a+b+c+d+e+f+g+h+i+j+k+l) avo(s~a+b+c+d+e+f+g+h+i+j+k+l) (There's likely a better way to do this actually, but I think this'll work.) How do I define e=a+b+c+d+e+f+g+h+i+j+k+l such that the following works? avo(q~e) avo(r~e)

Re: [R] Putting all independent variables in one variable so performing many similar tests is more convenient

2009-02-01 Thread Thomas Levine
oops, I mean aov On Sun, Feb 1, 2009 at 9:27 AM, Thomas Levine wrote: > I want to do something like this. > > avo(q~a+b+c+d+e+f+g+h+i+j+k+l) > avo(r~a+b+c+d+e+f+g+h+i+j+k+l) > avo(s~a+b+c+d+e+f+g+h+i+j+k+l) > > (There's likely a better way to do this actually, but I th

[R] Download daily weather data

2009-02-26 Thread Thomas Levine
a&state=NY&site=BGM&textField1=42.4422&textField2=-76.5002&e=0&FcstType=digital), but I can't figure out how to import them. Someone must have needed to do this before. Suggestions? Thomas Levine! __ R-help@r-project.org ma

Re: [R] Download daily weather data

2009-02-26 Thread Thomas Levine
too much work, so I just go by the current temperature in the morning, which leads to many false positives. Thomas Levine! On Thu, 2009-02-26 at 22:51 +, Barry Rowlingson wrote: > 2009/2/26 Thomas Levine : > > I'm writing a program that will tell me whether I should wear a c

Re: [R] Download daily weather data

2009-02-27 Thread Thomas Levine
ere are two parts to the task: find >>patterns that allow you to pull out the datum/data you're after; and >>then write a program to pull it/them out. Also, of course, download >>the webpage (but that's no issue). >> >>I bet you'd be able to find a comm

Re: [R] Inefficiency of SAS Programming

2009-02-27 Thread Thomas Levine
I had enrolled in a statistics course this semester, but after the first class, I dropped it because it uses SAS. This thread makes me quite glad. Tom! On Fri, Feb 27, 2009 at 8:48 AM, Frank E Harrell Jr wrote: > Wensui Liu wrote: >> >> Thanks for pointing me to the SAS code, Dr Harrell >> After

Re: [R] Inefficiency of SAS Programming

2009-03-02 Thread Thomas Levine
R depends on all of those things to run, but you only have to use those programs through R. The software depends on these other tools, but the human doesn't have to switch interfaces. Tom! On Fri, Feb 27, 2009 at 9:22 PM, Gabor Grothendieck wrote: > On Fri, Feb 27, 2009 at 8:53 AM, Frank E Harr

[R] Contour plots of four two-dimensional matrices

2009-03-15 Thread Thomas Levine
I have four large two-dimensional matrices of which I want to create contour plots. Something like filled.contour() contourplot() works but only gives me one plot at a time. If I combine the four matrices into one three-dimensional matrix, which I'll name "seven", there should be a way of doing s

Re: [R] Contour plots of four two-dimensional matrices

2009-03-15 Thread Thomas Levine
tion will be different for > those two options. > > contourplot is is a lattice plotting function. See Figure 6.10 on Sarkar's > Lattice book pages. levelplot is the closest analog to filled contour in > lattice. > -- > David Winsemius > > > > On Mar 15, 2009,

[R] Plot the highest point in a contour plot

2009-03-26 Thread Thomas Levine
I'm plotting contour plots with contourplot. which.max gives me the index of the highest point of a matrix. I can find the point in the matrix from here, convert it to a point on a graph and add it with points, but you'd think someone's already written this. How do I plot the highest point in a c

[R] Plotting multiple ablines

2009-04-01 Thread Thomas Levine
I really want to do this: abline( a=tan(-kT*pi/180), b=kY-tan(-kT*pi/180)*kX ) where kX,kY and kT are vectors of equal length. But I can't do that with abline unless I use a loop, and I haven't figured out the least unelegant way of writing the loop yet. So is there a way to do this without a loo

Re: [R] Plotting multiple ablines

2009-04-03 Thread Thomas Levine
Thu, Apr 2, 2009 at 8:29 AM, r...@quantide.com wrote: > May be: > > plot(c(-1, 1) , c(-1, 1), type = "n") > n = 4 > a = rep(0, n) > b = 1:n/n > > > fun = function(i, a, b, col = 1 , ...) { > abline(a[i], b[i], col = col[i], ...) > } > > lapply(1:

[R] Error in FUN with tapply and by

2009-05-22 Thread Thomas Levine
ne.integrated,mean,na.rm=T)[2]-tapply(time,Baseline.integrated,mean,na.rm=T)[1])} To help explain what the truecost function does: > tapply(t_p1,Baseline.integrated,mean,na.rm=T) Baseline Integrated 212.8000 252.8402 > truecost(t_p1) [1] 40.04021 Then I

Re: [R] Error in FUN with tapply and by

2009-05-22 Thread Thomas Levine
onPrefHand": 1 1 1 1 1 1 1 1 1 1 ... > str(Grip) Factor w/ 2 levels "Round","Tripod": 1 1 1 1 1 1 1 1 1 1 ... On Fri, May 22, 2009 at 2:46 PM, jim holtman wrote: > You need to supply str for the original arguments; the error message had a > different set of parameter

[R] Labeling barplot bars by multiple factors

2009-05-27 Thread Thomas Levine
I want to plot quantitative data as a function of three two-level factors. How do I group the bars on a barplot by level through labeling and spacing? Here 's what I'm thinking of. Also, I'm pretty sure that I want a barplot, but there

Re: [R] Labeling barplot bars by multiple factors

2009-05-28 Thread Thomas Levine
Both of those worked, but hierobarp looked a bit easier, so I used that. The one annoying thing is that it sorts alphabetically. Tom On Thu, May 28, 2009 at 6:46 AM, Jim Lemon wrote: > Thomas Levine wrote: > >> I want to plot quantitative data as a function of three two-level fac

Re: [R] Labeling barplot bars by multiple factors

2009-05-28 Thread Thomas Levine
>> [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Levine >> Sent: Thursday, May 28, 2009 5:04 AM >> To: Jim Lemon >> Cc: r-help@r-project.org >> Subject: Re: [R] Labeling barplot bars by multiple factors >> >> Both of those worked, but hierobarp l

[R] How to import timestamps from emails into R

2009-06-19 Thread Thomas Levine
I am analysing occurrences of a phenomenon by time, and each of these timestamps taken from email headers represents one occurrence. (The last number is the time zone.) I can easily change the format. Sun, 14 Jun 2009 07:33:00 -0700 Sun, 14 Jun 2009 08:35:10 -0700 Sun, 14 Jun 2009 21:26:34 -0700 M

Re: [R] How to import timestamps from emails into R

2009-06-20 Thread Thomas Levine
0 > Wed, 17 Jun 2009 21:50:41 -0700" > > # L <- readLines("myfile.txt") > L <- readLines(textConnection(Lines)) > tt <- as.POSIXct(L, format = "%a, %d %b %Y %H:%M:%S") > > > > On Fri, Jun 19, 2009 at 6:06 PM, Thomas Levine > wrote: >

Re: [R] How to import timestamps from emails into R

2009-06-20 Thread Thomas Levine
ng(tt)), putting the time axis along the bottom. Thanks Tom On Sat, Jun 20, 2009 at 11:15 AM, Gabor Grothendieck < ggrothendi...@gmail.com> wrote: > Try this: > > plot(seq_along(tt), tt) > > > On Sat, Jun 20, 2009 at 10:55 AM, Thomas Levine > wrote: > > Here'

Re: [R] How to import timestamps from emails into R

2009-06-24 Thread Thomas Levine
One last tiny problem: How do I add months to the scale? It currently just has years http://school.thomaslevine.org/mywall.png Thanks again Tom On Sat, Jun 20, 2009 at 12:14 PM, Thomas Levine wrote: > I wasn't really thinking that far ahead; plot tries to do something, so I > figu

[R] A graphic art piece I created that only statisticians would understand and the use of R in art

2009-06-29 Thread Thomas Levine
This isn't the typical r-help post, but I think people here will appreciate it. The current Shirt.Woot (http://shirt.woot.com) derby prompt is fake band names, so I chose the name "The Probable Error of a Mean." And I made my submission with R. Here it is: http://www.thomaslevine.org/the_probable_