search for: average_score

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

2008 Feb 10
11
data frame question
Hello I have 2 data frames df1 and df2. I would like to create a new data frame new_df which will contain only the common rows based on the first 2 columns (chrN and start). The column score in the new data frame should be replaced with a column containing the average score (average_score) from df1 and df2. df1= data.frame(chrN= c(“chr1”, “chr1”, “chr1”, “chr1”, “chr2”, “chr2”, “chr2”), start= c(23, 82, 95, 108, 95, 108, 121), end= c(33, 92, 105, 118, 105, 118, 131), score= c(3, 6, 2, 4, 9, 2, 7)) df2= data.frame(chrN= c(“chr1”, “chr2”, “chr2”, “chr2” , “chr2”),...
2006 Jun 09
0
Calculations based on multiple tables
...d(params[:id]) @contest_entries = ContestEntry.find_all_by_contest_id(@contest.id) @contest_entries.each do |contest_entry| songs = ContestRating.find_all_by_contest_entry_id (contest_entry.id.to_s) total = 0 songs.each do |song| total += song.score end average_score = total.to_f / songs.size.to_f song_name = Song.find_by_id(contest_entry.song_id) end end Thank you, Dave Hoefler -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060609/4bfdba9f/attachment.html
2008 Feb 11
0
Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)
...ent-Type: text/plain Hello I have 2 data frames df1 and df2. I would like to create a new data frame new_df which will contain only the common rows based on the first 2 columns (chrN and start). The column score in the new data frame should be replaced with a column containing the average score (average_score) from df1 and df2. df1= data.frame(chrN= c(?chr1?, ?chr1?, ?chr1?, ?chr1?, ?chr2?, ?chr2?, ?chr2?), start= c(23, 82, 95, 108, 95, 108, 121), end= c(33, 92, 105, 118, 105, 118, 131), score= c(3, 6, 2, 4, 9, 2, 7)) df2= data.frame(chrN= c(?chr1?, ?chr2?, ?chr2?, ?chr2? , ?chr2?), s...