similar to: HABTM :insert_sql help

Displaying 20 results from an estimated 300 matches similar to: "HABTM :insert_sql help"

2012 Apr 03
2
Grouping and/or splitting
I have a dataframe imported from csv file below: Houseid,Personid,Tripid,taz 1,1,1,4 1,1,2,7 2,1,1,96 2,1,2,4 2,1,3,2 2,2,1,58 There are three groups identified based on the combination of first and second columns. How do I split this data frame? I tried aa <- split(inpfil, inpfil[,1:2]) but it has problems. Output desired is aa[1] Houseid,Personid,Tripid,taz 1,1,1,4 1,1,2,7 aa[2]
2006 Jun 16
3
Does HABTM support non "id" FKs?
Quick question. Say I have a geographical database with counties and zip codes where counties have and belong to many zip codes. zip_codes (id, zip_code) counties (id, name) When I create the association table, the Rails way says to do the following: counties_zip_codes (county_id, zip_code_id). However, given that zip_codes.zip_code is itself a candidate key, I would much prefer to do the
2009 Dec 22
3
vector indexing problem in multilevel data: assigning a specific value to all group members
Dear List, I work with multilevel data from psychological group experiments and have frequently encountered a situation for which I haven't found an elegant solution: I need to assign the value of a specific group member to all members of the group. For example, I have a group leader (identified by a binary vector) and some attribute for all group members. I want to create a new
2006 Jan 03
0
habtm and insert_sql
Briefly, I want to create an :insert_sql attribute for a has_and_belongs_to_many relationship, and then add items to that relationship using push_with_attributes. Is that possible? Less briefly: I have a legacy postgresql database where one of the join tables has an ID column, so I had to set up the association with a custom :finder_sql attribute, as follows: class Topic <
2007 Nov 14
1
reading tables from url
I'm trying to read some web tables directly into R. These are both genome sequencing projects (eukaryotes and metagenomes) from NCBI and look very similar; however, only the first one works. http://www.ncbi.nlm.nih.gov/genomes/leuks.cgi http://www.ncbi.nlm.nih.gov/genomes/lenvs.cgi I added ?dump=selected to the end of the url string to get a tab- delimited file (which is what happens
2007 Dec 24
3
Affy Package
Dear R Users, In the expresso function, which combination of these methods for data pre-processing (when using affymetrix oligo arrays) is the best: bgcorrect.metod = rma rma2 mas normalize.method = qspline quantiles loess pmcorrect.method = pmonly subtractmm mas summary.method = liwong avgdiff medianpolish mas There are many options within each method. I would appreciate a hint on the best
2013 Mar 04
3
urgent: question concerning data manipulation
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130304/62581e97/attachment.pl>
2009 Jun 30
1
beadarray package
Dear R users, I am using the beadarray package. I am trying to upload raw bead-level data using these commands: ######################################################## library(beadarray) datadir <- ("C:/Computer_programs/R/beadarray/cecilia") targets = read.table("targets.txt", sep = "\t", header = TRUE, as.is = TRUE) BLData = readIllumina(arrayNames =NULL,
2007 Dec 26
1
nlme package
In using the NLME package (R 2.6.1 for Windows), I am having a problem in running an R script that used to run with no problems using a Linux OS in 2004. So I am wondering if during these last ~3 yrs we had major changes in the syntax of the NLME package that I am not aware. This is the R script: library(nlme) treat=as.factor(c(1,2,1,2,1,2,1,2)) mouse=as.factor(c(1,1,2,2,3,3,4,4))
2007 Jan 28
3
always Not Found
hi! I''m migrating to Rails 1.2.1 (from 1.1.6), but now I''m getting a 404 (Not Found) page for every url I call! Not even the error messages I got before are shown on this page anymore. So I took a look into development.log, but there everything is ok, WebRick sends Http 200 OK. The routes.rb I left as the standard: map.connect '':controller/:action/:projectid''
2006 Feb 23
6
prototype ajax + xml response
Hi, I am looking for a solution to use ajax.request object. Return response text will be in xml format and I like to know how to parse that xml information, so that I can put those info into the "span" or "div" tags of my html page. Is there any easy way to parse that xml info using prototype library? Thanks, kevin. -- Posted via http://www.ruby-forum.com/.
2010 Jan 22
0
creating a new record in a pop-up-window
hi, i have a Project-Task model association. The Project: SHOW & EDIT list the tasks...now: i want to have a pop-up-window triggered in the edit view. the pop-up-window should show a basic Task-NEW form, BUT with some information about the Project, eg the title of the project. after submitting i want to get the Project -EDIT View to be reloaded. 1) i have the pop-up window:
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,
2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
I have a data set something like this: "YYYY", "Value" 1972 , 117 1984 , 73 1969 , 92 1976 , 113 1999 , 80 1996 , 78 1976 , 98 1984 , 106 1976 , 99 it could be created with: > dafSamp <- data.frame(cbind(c(1972,1984,1969,1976,1999,1996,1976,1984,1976),c(117,73,92,113,80,78,98,106,99))) The real dataset is of cause much larger, app. 100.000 samples
2007 Sep 06
4
HABTM association with own class?
If I have a class, Asset, which has and belongs to many associated Asset objects, how do I do this? has_and_belongs_to_many :associated_assets, :class => "Asset", :foreign_key => ?????, :association_foreign_key => ????? Right now, my table has a :first_asset_id and a :second_asset_id, but I don''t see how the objects themselves are supposed to distinguish one from the
2007 Feb 19
0
Ajax.Update nested within Ajax.Request
Hi everyone, I have a script below that submits a form using Ajax.Request which is working fine. onComplete or onSuccess though, I''d like it to refresh the div form (formCapture), but so far I can''t get it to work. The script runs to into the onComplete stage, but the div isn''t refreshed. Can anyone help with this? Regards, Robert Hofmeyr function subForm() { new
2010 Oct 06
2
reflect_on_association method
Hi all, I am having trouble trying to use reflect_on_association method with given the simplified model: class Order < ActiveRecord::Base belongs_to :contractor, :class_name => "BusinessUnit" end I expected the reflect_on_association method to return associated_foreign_key "contractor_id" but it returns "business_unit_id": ruby-1.9.2-p0 >
2005 Mar 08
15
Rails 0.10.1and WEBrick
Doesn''t appear to work with WEBrick. Works find with Apache/FastCGI. Something wrong in the way Rails is trying to process paths from the WEBrick server. If I try to send in http://localhost:3000/recipes/new, WEBrick is interpreting /new as my controller, instead of my action.
2007 Jul 26
1
Bi-directional self-referential HABTM
Hi, I''m having a little trouble figuring out how to make a self- referential HABTM bi-directional. I have a Employee class. Each employee can have a couple of bosses, who are also employees. The employee class has the following HABTM: has_and_belongs_to_many :bosses, :class_name => "Employee", :join_table => "bosses_courses", :association_foreign_key =>
2006 Feb 27
4
2 belongs_to to the same parent table
Hello! I have 2 table: users and buddies User: id, name, ... Buddy: id, user_id, user_buddy_id, ... So if you have 2 users 1,jack and 2,fred and fred is a buddy of jack, there is a Buddy object: id=1, user_id=1, user_buddy_id=2 I can declare only one belongs_to in Buddy and one has_many in User. And there is conflict if I had the second one (the first one is discarded) class User has_many