similar to: please explain find_with_ferret, retrieve_records, :include and :conditions

Displaying 20 results from an estimated 200 matches similar to: "please explain find_with_ferret, retrieve_records, :include and :conditions"

2009 Oct 28
2
regression on large file
Dear R community, I have a fairly large file with variables in rows. Every variable (thousands) needs to be regressed on a reference variable. The file is too big to load into R (or R gets too slow having done it) and I do now read in line by line with "scan" (see below) and write the results to out. Although improved, this is still very slow... Can someone please help me and suggest
2005 Oct 31
2
Cascading Comboboxen and GO button ?
Hello all, I have two comboboxen, comboA is popultaed when :controller/list is retrieved first time. When comboA is selected, I want to auto-populate comboB (modelB belongs_to modelA). The population of tableC (modelC belongs_to modelB and belongs_to modelA) should not populate until a "GO" button is clicked (link_to with submit). Help? I need an example of how to filter the post
2006 Mar 31
1
model comparison with mixed effects glm
I use model comparison with glms without mixed effects with anova(modelA,modelB), with mixed effects glm (glmmPQL), this doesn't work. Is there a way to compare model fits with glmmPQL's? Paula M. den Hartog Behavioural Biology Institute of Biology Leiden Leiden University [[alternative HTML version deleted]]
2006 Apr 06
5
Using helper method of another model
I have a template that belongs to a certain model (model A). I need to call a helper method of a different model (model B). Then I need the helper method of B to call a helper method of model C. I tried using "include" and "require" and using namespaces, but I got "undefined method". What is the way to do it? -- Posted via http://www.ruby-forum.com/.
2009 Oct 26
2
find_with_ferret issue
Hi All, I''m implementing the ferret search engine on my railspace project. In my User and Info model, I have line that reads: acts_as_ferret :fields => [''username'', ''email''] This initially generates a find_by_contents which is added to the community contoller: @users = User. find_by_contents(query, :limit => :all) THis returned a method
2011 Oct 20
2
Access other model attributes directly with has_one, belongs_to ?
So, I have 2 models A and B that share 5 common attributes and all other attributes are different. So I wanted to extract these 5 out into one common table and use has_one, belongs_to to knit it back together. So now there are 3 tables with 1 having the shared properties, we''ll call this table C. Table A id dollar_amount Table B id quantity_on_hand Table C id version My question is,
2007 Dec 19
3
multi-model search best practices
Hi folks. If I am indexing ModelA and ModelB and I want to search both of them, I usually just pick one arbitrarily and use it for #multi_search. Is there a slicker pattern, regarding from which model to invoke #multi_search? Can it be invoked directly from the Ferret library? Has anyone put together some sort of "dummy" search class? Thanks for any ideas. John
2009 Oct 12
1
Speed up and limit memory usage of lm()
Hi all I have been doing series of linear regression models lm(). In this case the execution time and memory usage becomes a huge issue. I have therefore been trying to speed the process and limit the memory usage. Here follows part of the code do give better understanding of what I am doing: modela <- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI) frssys <-
2003 Jul 23
6
Condition indexes and variance inflation factors
Has anyone programmed condition indexes in R? I know that there is a function for variance inflation factors available in the car package; however, Belsley (1991) Conditioning Diagnostics (Wiley) notes that there are several weaknesses of VIFs: e.g. 1) High VIFs are sufficient but not necessary conditions for collinearity 2) VIFs don't diagnose the number of collinearities and 3) No one has
2007 May 04
1
habtm and also has_many of the same things
Hi, our app is a situation where users can upload files and also mark files uploaded by other users as their favorites. So for the favorites we are using a simple many-to-many with a tie table. So in attempting that it looks like class User < ActiveRecord::Base has_and_belongs_to_many :media_file has_many :media_file end class MediaFile < ActiveRecord::Base
2008 Feb 01
0
find_with_ferret and HABTM assocs
Could you be more specific about what is not working? -- Are your association methods between Role and User being set up correctly? (If not, make sure your statement is "has_and_belongs_to_many", and not "hasandbelongstomany".) -- Are you storing the data for role_name in the index? If so, can you see it there? I''m not familiar with the find_with_ferret
2012 Nov 01
2
Name assignment in for loop
Dear helpeRs- I'm using a for loop to create a series of models. I'm trying to assign a name to each model created, using the loop index. The loop gets stuck at the name of the model, giving the error "target of assignment expands to non-language object". The linear model runs without error; only the name is problematic. Here is the current loop syntax. The use of dat
2011 Aug 10
3
How to quickly convert a data.frame into a structure of lists
Hello, This is my first project in R, so I'm trying to work 'the R way', but it still feels awkward sometimes. The problem that I'm facing right now is that I need to convert a data.frame into a structure of lists. The data.frame has columns in the order of tens (I need to focus on only three of them) and rows in the order of millions. So it's quite a big dataset. Let say
2006 Mar 10
1
Validate fields and display errors from two models?
Hi, I have here a problem I''ve been working at for a little while but I can''t seem to get the error messages to appear correctly. My form looks something like this for "ModelA": [errors_for "modelA"] [form for "modelA"] [text "modelA" "fieldname1"] [text "modelB" "fieldname2"] [submit] [/form] The reason
2007 Nov 20
2
Question on Deploying a Ferret DRb server
(Sorry if some people see this twice. I originally posted this question from ruby-forum.com, but didn''t realize that the Ferret forum was a mirror and that I actually wasn''t a member.) Anyway, I''ve read all the documentation I could find, and read most of this forum, but I''m a still a little confused on running a ferret DRb server. All the examples seem to be
2011 Jan 19
3
lme-post hoc
Hi all, I analysed my data with lme and after that I spent a lot of time for mean separation of treatments (post hoc). But still I couldn’t make through it. This is my data set and R scripts I tried. replication fertilizer variety plot height 1 level1 var1 1504 52 1 level1 var3 1506 59 1 level1 var4 1509 54 1 level1 var2 1510 48 2 level1 var1 2604 47 2 level1 var4 2606 51 2 level1 var3
2006 Feb 24
1
predicting glm on a new dataset
Hello together, I would like to predict my fitted values on a new dataset. The original dataset consists of the variable a and b (data.frame(a,b)). The dataset for prediction consists of the same variables, but variable b has a constant value (x) added towards it (data.frame (a,b+x). The prediction command returns the identical set of predicted values as for the original dataset yet I would have
2010 Jan 21
2
will_paginate ?
Does anyone have experience with will_paginate? I''m trying to use it with acts_as_ferret. routes.rb ... map.search ''/search'', :controller => ''notes'', :action => ''search'' notes.rb ... acts_as_ferret :fields => [ ''body'' ] notes_controller.rb ... def search if params[ :query ] @query = params[
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi, am using this wonderful plugin acts_as_ferret and according to the tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic I worked it out except the pagination feature. If I have 12 records and I give limit to 10, its correctly displaying 10 records in the first page and is giving the link to the second page too. But when I go to the next page I find the same 10 records instead of
2008 Jun 25
3
Need some suggestions on search strategy
I need some suggestions for the best way to implement search for my client. They have several models (project, request, usage, etc.) that they need to search for. Each model will have its own search page with a form that is similar to the one shown for editing. So the search needs to be across model fields and the results are limited to the model. Some of the model fields will be for