similar to: Single Table Inheritance

Displaying 20 results from an estimated 5000 matches similar to: "Single Table Inheritance"

2005 Dec 27
3
Trouble combining :has_many, :finder_sql and :conditions to create a sub-search
I''m sure there''s something right under my nose that I''m missing. I have two tables with two parallel one-to-many relationships. I wish to use the :finder_sql parameter to essentially ''or'' the two foreign keys. What isn''t working for me is performing a ''sub-search''. Let''s say the tables are "stores" and
2005 Dec 30
5
HABTM with finder_sql problem (Rails bug?)
I''m building an app that needs i18n support across the entire database (i.e. localized attributes). In order to do this I''ve created a special HABTM join table that can be associated with _any_ other table: create table language_strings ( for_table varchar(255) not null, foreign_id int not null, language_id varchar(5) not null, attr_name varchar(255) not null, value text
2006 Jan 04
5
habtm recusive
I have a people table: CREATE TABLE people ( id int(10) unsigned NOT NULL auto_increment, first_name varchar(75) default NULL, middle_name varchar(75) default NULL, last_name varchar(75) default NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1272 ; and a people_people table: CREATE TABLE people_people ( person_id int(11) unsigned NOT NULL,
2005 Dec 28
9
Idiom question - assertions which aren''t in tests
All, Although I''ve been keeping an eye on Ruby for several years now, I don''t have a huge amount of experience with it. So please forgive me if I''m missing something obvious. I''m in the process of writing my first really "serious" Rails app and would appreciate your advice. I am wondering if there is a standard idiom for including assertions in
2006 Jan 03
1
Another Rails blog entry out of Apress
A short entry, but good words about Rails. http://ablog.apress.com/?p=842 -- thanks, -pate -------------------------
2006 Aug 18
4
DateBocks v2.0.0 Released
Excert from http://www.nshb.net/datebocks-2-0-0-released Woohoo!! Finally released the next generation of DateBocks (aka DateBox) v2.0.0. This was a long time coming, after its initial version release allll the way back in January, this is a nice edition to the popular tool I released before. This version is chalked full of features. Here is the cut out from the CHANGELOG == 2.0.0 - AUGUST 16,
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers #I have a data panel of thousands of firms, by year and industry and #one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not #and another variable the represents the firm dimension (total assets in thousand of euros) #I need to create two separated samples with the same number os firms where #one firm in the first have a corresponding
2011 May 19
2
balanced panel data
I have a dataframe with many firm-year observations and many variables. Not all firms have information for all the years. I want another dataframe with only those firms that have information all years. This is, I want a balanced panel data, but with the maximum number of years. In my reprocucible example I want to keep firms 1,2 and 3 (period 2000 to 2004). I need your help to create a
2005 Sep 05
4
Dummy variables model
Hi, all! Anyone know an easy way to specify the following model. Panel dataset, with stock through time, by firm. I want to run a model of y on a bunch of explanatory variables, and one dummy for each firm, which is 1 for observations that come from firm i, and 0 everywhere else. I have over 200 firms (and a factor variable that contains a firm identifier). Any easy way of going about
2011 Oct 02
2
subset in dataframes
I need help in subseting a dataframe: data1<-data.frame(year=c(2001,2002,2003,2004,2001,2002,2003,2004, 2001,2002,2003,2004,2001,2002,2003,2004), firm=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),x=c(11,22,-32,25,-26,47,85,98, 101,14,87,56,12,43,67,54), y=c(110,220,302,250,260,470,850,980,1010,140,870,560,120,430,670,540)) data1 I want to keep the firms where all x>0 (where there are
2009 May 10
1
Select the rows in a dataframe that matches a criteria in another dataframe
Hi everyone! Thank you for the help you have been given to me, and here I'm with another problem with my dataframes: I have two dataframes (with much more observations), like these: Dataframe1 Firm Year cash 500400200 2007 100 500400200 2006 200 500400200 2005 400 500400300 2007 300 500400300 2006 240 500400300 2005 120 500400400
2004 Jun 17
2
Question on lists and vectors of lists
I have an elementary programming question. Could someone please point me in the right direction? I have a function which will run for thousands of companies. At each invocation, it returns 2 numbers. I plan to do something like: think_one_firm <- function(filename) { # Do stuff return(list(x=x,y=y)) } So for each of the firms in my dataset, I will call
2010 Jul 22
4
Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables
Dear R-user, a few weeks ago I consulted the list-serve with a similar question. However, my task changed a little but sufficiently to get lost again. So I would appreciate any help on the following issue. I use the plm package and work with firm-level data in a panel. I would like to eliminate all firms that do not fulfill the requirement of having an observation in every variable used for at
2006 Jan 22
6
Making a markov transition matrix
Folks, I am holding a dataset where firms are observed for a fixed (and small) set of years. The data is in "long" format - one record for one firm for one point in time. A state variable is observed (a factor). I wish to make a markov transition matrix about the time-series evolution of that state variable. The code below does this. But it's hardcoded to the specific years that I
2010 Jan 22
2
sorted reshaping?
dear R wizards:? I am wrestling with reshape.? I have a long data set that I want to convert into a wide data set, in which rows are firms and columns are years. > summary(rin) firm fyear sim1 Min. :1004.00 Min. :1964.0 Min. : -1.00000 1st Qu.:1010.00 1st Qu.:1979.0 1st Qu.: -0.14334 Median :1016.00 Median :1986.0 Median : 0.00116 Mean
2006 Jun 21
5
Problem with observe_field
Hi folks, I have following in my view : =================== <div class="foo"> <%= select ''theme'', "id", Theme.find_all.collect {|t| [ t.name, t.id ] }, { :prompt => ''Select a theme'' } %> </div> <%= observe_field( :theme_id, :update => :my_style, :url => { :action => :themelookup, :id => @space,},
2004 Oct 03
2
Computing and testing transition probabilities?
Folks, I have a situation with many firms, observed for many years (but it's not panel data, so every now and then data for a firm just goes missing). Let me show you an example. There are 3 firms "a", "b" and "c". There are 3 years: 1981, 1982 and 1983. There's a factor f which takes values 1, 2 or 3. set.seed(5) D = data.frame( names=c("a",
2005 Feb 17
1
Multiple Fstats/breakpoints test using Panel data
Hi, I have recently use the strucchange package in R with a single time series observation. I found it extremely useful in the testing of change points. Now, I am thinking of using the strucchange package with panel data (about 500 firms, with 73 monthly time series observations each). For each firm, I have to conduct the Fstats and breakpoints tests. Based on the test of each firm, I have to
2013 Apr 08
2
How can I extract part of the data in a panel dataset?
Taking the Grunfeld data, which is built-in in R, for example, (1)How can I construct a dataset (or dataframe) that consists of the data of all firms in 1951? (2)How can I calculate the average capital in each form over the period 1951-1954? What I can imagine is to categorize the data by firm, and then select the data between 1951 and 1954 for each firm, but how can I do it? Thanks, Miao
2005 Dec 19
2
Unit/Functional testing for AJAX functions?
I really have no more input than that, so the subject speaks for itself. How do you test that AJAX effects shown in the browser are actually happening? Maybe an auto-complete form field is a good starting example. Sean