search for: average_value

Displaying 3 results from an estimated 3 matches for "average_value".

2009 May 15
2
Help with loops
Hi I am trying to create a loop which averages replicates in my data. The original data has many rows. and consists of 40 column zz[,2:41] plus row headings in zz[,1] I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on. below is my script but it seems to be stuck in an endless loop Any suggestions?? for (i in 1:length(average_value[,1])) { average_value[i] <- i^100; print(average_value[i]) #calculates Meanss #Sample A average_value[i,2] <- rowMeans(zz[i,2:3]) average_value[i,3] <- rowMea...
2009 May 15
1
Fw: Help with loops(corrected question)
..., 2009, 12:17 PM > Hi > I am trying to create a loop which averages replicates in > my data. > The original data has many rows. and consists of 40 column > zz[,2:41] plus row headings in zz[,1] > I am trying to average each set of values (i.e. zz[1,2:3] > averaged and placed in average_value[1,2] and so on. > below is my script but it seems to be stuck in an endless > loop > Any suggestions?? > > for (i in 1:length(zz[,1])) { > > #calculates Meanss > #Sample A > average_value[i,2] <- rowMeans(zz[i,2:3]) > average_value[i,3] <- rowMeans(zz[i,4:5])...
2006 Nov 08
1
Muliple SQL statements / Return percentage of rows
I''m stumped... I need to return a number of rows with the top & bottom x percentage of rows removed in mysql 4.x e.g. SELECT COUNT(*) value_count, SUM(deals.value) / COUNT(*) average_value FROM deals ORDER BY deals.value Now say that returns the sum of 100 deals, what I actually need to do is return the count & sum of rows 10-90 (i.e. the top & bottom 10% rows removed) I found this which I can adapt but it requires two sql statements http://www.gloomy.eu/mysql-desired-per...