search for: species_id

Displaying 7 results from an estimated 7 matches for "species_id".

Did you mean: series_id
2006 Jan 19
8
I can''t figure out how to solve this one
...+--------------------- +----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+--------------------- +----------------+ | id | int(11) | | PRI | NULL | auto_increment | | species_id | int(11) | | | 0 | | | location_id | int(11) | | | 0 | | | caught_on | datetime | | | 0000-00-00 00:00:00 | | | user_id | int(11) | | | 0...
2007 Nov 16
4
Newb - variable returns # sign?
...veRecord::Base has_many :inventories end class Inventory < ActiveRecord::Base belongs_to :species (this is the singular and the plural, so that''s OK) end My inventory_controller looks like: def show @inventory = Inventory.find(params[:id]) @variety = Species.find(params[:species_id]) end and in the inventory show view: <%= @variety %> my out put shows all the fields from the inventory but only a pound sign(#) where the @variety is at. Any thoughts? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Go...
2006 Jan 19
2
NOOB: Using locals to pass data to a SQL query
...#39;, :id => entry }, :confirm => ''Are you sure?'' %></td> </tr> <% end %> Model: def self.mine find_by_sql("select entries.id, species.name, length,species.multiplier*length as score,caught_on from entries join species on species_id = species.id where user_id = ? order by score DESC", myfish) end Basically I am trying to get the current value of session[:user].id into the find_by_sql query. Any pointers? - Bill
2006 Jan 10
0
find_by_sql + partials question
...now that I have find_by_sql love working for my "Top 10 List" I want to make them a bit more DRY. Tis is what I have so far: Model: def self.topfish find_by_sql["select species.name, length,species.multiplier*length as score,caught_on from entries join species on species_id = species.id where species_id = ? order by score DESC LIMIT 10", species] end This data is spit out as part of a partial: Partial: <% for ling in @topfish %> <table border ="0" CELLSPACING="0"> <tr class="<%= alternate %>"> &lt...
2012 Jul 28
1
Mixed-model with paired design & covariates
...sponse variable - 2 model types (model_type) -> fixed effect - 230 species (species) -> random effect - 10 replicates/species (replicate) -> random effect - 10 subreplicate/replicate -> observation So I have: 10*10*230 observations/model, identified as speciesID_replicate_subreplicate (species_ID ranging 1:230, replicate 1:10 and subreplicate 1:10) One could think about such mixed-effect model: my.model<-lme(fixed = accuracy_measure~model_type, random = ~1|species/replicate) I do not expand here into model simplification nor if it is best to use lme or lmer, YET... but here are more c...
2006 Jan 12
0
[file_column] Problem displaying images after upload
...;1/testpic.jpg" >> I think this might have todo with the way I am building @entry via a find_by_sql: def self.mine find_by_sql("select entries.id,entries.image, species.name, length,species.multiplier*length as score,caught_on from entries join species on species_id = species.id order by score DESC") end Any ideas what I am doing wrong? - Bill
2009 May 01
0
Apologies: example of data needing zeros-no NA values
...giving an example of the data. There actually are no NA values, so I'm not simply replacing values in the data frame. So, the number of species (and therefore abundance values) listed in each treatment differs, even though they all have the same number of plots sampled. Sample_ID Spec_num Species_ID Abundance Treatment 1 1 SOLCAN 0.05 1 2 1 SOLCAN 1.5 1 3 1 SOLCAN 2.1 2 4 1 SOLCAN 3.2 2 5 2 ERISTR 2.4 1 6 2 ERISTR 3.1 1 7 2 ERISTR 5.6 1 8 2 ERISTR 6.3 1 9 2 ERISTR 2 1 10 2 ERISTR 3 2 11 2 ERISTR 2.1 2 Sorry fo...