[R] multiple paired t-tests without loops

2010-04-24 Thread Matthew Finkbeiner
how to do it faster? thank you kindly, Matthew Finkbeiner "Sample""C1""C2""PermN" 158perm1 143perm1 164perm1 226perm1 231perm1 274perm1 1

[R] multiple paired t-tests without loops

2010-04-24 Thread Matthew Finkbeiner
how to do it faster? thank you kindly, Matthew Finkbeiner "Sample" "C1" "C2" "PermN" 1 5 8 perm1 1 4 3 perm1 1 6 4 perm1 2 2 6 perm1 2 3

Re: [R] multiple paired t-tests without loops

2010-04-26 Thread Matthew Finkbeiner
Yes, I suspect that I will end up using a sampling approach, but I'd like to use an exact test if it's at all feasible. Here are two samples of data from 3 subjects: Sample SubjC1 C2 44 1 0.0093 0.0077 44 2 0.0089 0.0069 44 3 0.051 0.0432 44 4

[R] summary stats on continuous data

2010-06-15 Thread Matthew Finkbeiner
I'm sorry for what I'm sure is a terribly simple question. I have a large dataframe along these lines: S<- 1:3 d<- data.frame(cbind(S=rep(paste('S',S,sep=""),each=30), trial=rep(1:3,each=10), FactorA=rep(paste('L',1,sep=""),each=30), Acc= c(rep(1,each=20),rep(0,each=10)), Sample=rep(1:10,

Re: [R] summary stats on continuous data

2010-06-15 Thread Matthew Finkbeiner
Hi Daniel, thanks for your reply. Unfortunately, that is not doing what I need. In the example I sent, there are three subjects (S1, S2 & S3). Each subject has 3 trials worth of data and each trial has 10 samples. What I want to return is the accuracy rate for each subject. The answer is 66.6

[R] sample from very large distribution

2010-09-29 Thread Matthew Finkbeiner
I don't have enough RAM for this problem, so I need a work around. This is what I want to do: y<- sample(2^32, 10, replace=FALSE) but my machine won't let me do that. so I now do this: x<- seq(1,2^32, by=100) y<- sample(x, 10, replace=FALSE) this works fine, but by selecting every 100

[R] problem with spline

2010-10-01 Thread Matthew Finkbeiner
I am trying to interpolate missing values using spline and am running into some strange problems. first, this works just fine: x<- c(1:10, rep(NA, 3), 14:20) y<- c(rnorm(10), rep(NA,3), rnorm(7)) s<- spline(x,y, n=length(x)) plot(x,y) lines(s, col="blue") but look at what happens with my real d

Re: [R] problem with spline

2010-10-02 Thread Matthew Finkbeiner
s under > the impression that for a hermite spline fit the xs had to be strictly > increasing (as in your toy example) whereas in your actual data the x > values increase then decrease. > > Michael > > On 2 October 2010 11:59, Matthew Finkbeiner > wrote: >> I am trying

[R] remove data frame from list of data frames

2010-11-07 Thread Matthew Finkbeiner
I have a list of data frames like this: a<- data.frame(x=runif(10), y = runif(10), Acc = 1) b<- data.frame(x=runif(10), y = runif(10), Acc = 0) ls<- list(a,b) and I want to remove the data frames from ls that have Acc values other than 1. How do I do that? Thanks for any help! Matthew ___

Re: [R] remove data frame from list of data frames

2010-11-07 Thread Matthew Finkbeiner
90820779 0.3841037   1 > 5  0.20168193 0.7698414   1 > 6  0.89838968 0.4976992   1 > 7  0.94467527 0.7176185   1 > 8  0.66079779 0.9919061   1 > 9  0.62911404 0.3800352   1 > 10 0.06178627 0.7774452   1 > >> > > On Sun, Nov 7, 2010 at 6:07 AM, Matthew Finkbeiner > wrote:

[R] scramble items

2011-03-04 Thread Matthew Finkbeiner
Hi, I am trying to scramble items in a matrix so that no item repeats on consecutive rows. This generates the matrix: LevelsOfA = 2 LevelsOfB = 2 LevelsOfC = 3 Items = 10 FactorA = rep(1:LevelsOfA, each=(LevelsOfB*LevelsOfC*Items)) FactorB = rep(rep(1:LevelsOfB, each=(LevelsOfC*Items)),LevelsOfA

[R] means across list of data frames

2011-09-20 Thread Matthew Finkbeiner
I have a list of data frames like the following: set.seed(123) a<- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) b<- data.frame(x=runif(10), y = runif(10), sample = seq(1,10)) L<- list(a,b) All data frames in the list have the same dimensions. I need to calculate the sample means fo