Re: [R] Large dataset operations

2011-03-14 Thread hi Berven
Thanks for the help! All the methods above worked well and cleared up some misunderstandings. Thanks! Haakon =) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat

Re: [R] Large dataset operations

2011-03-11 Thread Claudia Beleites
Haakon, as replicates imply that they all have the same data type, you can put them into a matrix which is often faster and needs less memory (though whether that can really matter depends of the number of replicates you have: for small no of replicates you won't have much effect anyways). Bu

Re: [R] Large dataset operations

2011-03-11 Thread Phil Spector
To get the equivalent of what your loop does, you could use lapply(data[,3:5],function(x)x/ave(x,data$plateNo,FUN=mean)) but you might find the output of sapply(data[,3:5],function(x)x/ave(x,data$plateNo,FUN=mean)) to be more useful. - Phil Spector

[R] Large dataset operations

2011-03-11 Thread hi Berven
Hello all, I'm new to R and trying to figure out how to perform calculations on a large dataset (300 000 datapoints). I have already made some code to do this but it is awfully slow. What I want to do is add a new column for each "rep_ " column where I have taken each value and divide it by t