similar to: seed data

Displaying 20 results from an estimated 4000 matches similar to: "seed data"

2009 Jun 23
2
Weighting column entries in a data frame
Hi Guys, I would like to weight column entries in a data frame by the population of each state. For example, here is some data: state statenum year income popul ALABAMA 1 1 9.703193 3973.00 ALABAMA 1 2 9.745950 3992.00 ALABAMA 1 3 9.762092 4015.00 ALASKA 2 1 10.221640 532.00 ALASKA 2 2 10.169600
2007 Nov 07
5
Unexplainable failure...at least for me
I have an address model with country_id and province_id fields There is also a full_address method that returns an address that is in a format that the google maps api will be able to return a long-lat coords. Within the full_address method there is a call to obtain the province/state and country name. --------- def full_address ... full_address = [city, self.province.name,
2006 Aug 03
1
Markdown and the hCal microformat
Hi, I've got a suggestion for adding something to Markdown's syntax. I'm new to the list, so I don't know if this is likely to be received well - I'm aware that it's not all that common (yet) to want to do something like this, and I don't know where everyone here stands on if or how to make markup more meaningful. I'd like to generate some microformated
2010 Aug 17
2
[Form] Method POST & PUT problem
Hello, I have a form that should be a POST method, but Rails insist to put a hidden field "_method" that has the value "put" does anyone knows why? Thanks, David Sousa Controller: ------------------------------- def new @user = @current_user end ------------------------------------------- View: ------------------------------------- <% semantic_form_for @user,
2012 Mar 12
3
lapply to change variable names and variable values
Hi: I'm sure this is a very easy problem. I've consulted Data Manipulation With R and the R Book and can't find an answer. Sample list of data frames looks as follows: .xx<-list(df<-data.frame(Var1=rep('Alabama', 400), Var2=rep(c(2004, 2005, 2006, 2007), 400)), df2<-data.frame(Var1=rep('Tennessee', 400), Var2=rep(c(2004,2005,2006,2007), 400)),
2012 May 28
4
How to load a selection list into the method new of a controller?
Hi friends! I''m relatively new with Rails and I''m struggling for a long time with this problem (it should have a pattern solution but until now I didn''t find it): I have the following models: Institution, City, State and Country. class Country < ActiveRecord::Base has_many :states has_many :cities, :through => :states end # == Schema Information # Table
2011 Oct 13
3
US States percentage change plot
Hi, I would like to make a plot of the US states (or lower 48) that are colored based upon a percentage change column. Ideally, it would gradually be more blue the larger the positive change, and more red the more negative is the change. The data I have looks like: State Percent.Change 1 Alabama 0.004040547 2 Alaska -0.000202211 3 Arizona -0.002524567 4 Arkansas
2009 Jan 28
3
Apply style in collection_select ?????
Hi to all, i have this snip i want to apply style to this combo but there is no effect help....... <%= collection_select(:customer,:country_id, @countries,:id, :country, html_options={ "style" => "width:110px" },:onchange => ''updateState('''');'',:id =>''country_id'' )%> Thanks, -- Posted via
2012 Jan 19
1
Alaska and Hawaii map data?
I can plot each county of the contiguous 48 states or all of them using variations of map('county', region=c('wisconsin' . . . .) in the maps package. I was wondering whether similar data was available for Alaska and Hawaii? I was also wondering if there was a database that listed FIPS codes for the counties in Alaska and Hawaii. Similar to 'county.fips'. Thank
2010 Nov 25
1
RODBC
Hi, I am running the RODBC examples form the help guide. I am trying to UPDATE a table in an Access data base but I am having an error. library(RODBC) library(termstrc) path = getwd() setwd(getwd()) dbName = "data.mdb" pathdbname = paste(path,"/",dbName,sep="") accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2009 Jul 03
2
mapping states with colors
Hi folks, I'm just learning how to use maps. As an initial foray, I'm mapping the states that have "duty to retreat" (blue) and "stand your ground" (red) self-defense standards. Here is my extremely naive script: dtr <- c('alabama', 'arizona', 'conneticut', 'delaware', 'dist of columbia' , 'hawaii',
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack 0.8.7, mysql 5.1.41) I has my_app/lib/migration_helpers.rb file: module MigrationHelpers def self.foreign_key(from_table, from_column, to_table) constraint_name = "fk_#{from_table}_#{to_table}" execute %{alter table #{from_table} add constraint #{constraint_name} foreign key (#{from_column})
2016 Apr 18
3
Sum of Numeric Values in a DF Column
Hi, I request help with the following: INPUT: A data frame where column "Lower" is a character containing numeric values (different count or occurrences of numeric values in each row, mostly 2) > dput(dd) structure(list(State = c("Alabama", "Alaska", "Arizona", "Arkansas", "California"), Lower = c("R 72?33",
2016 Apr 13
0
formula argument evaluation
%=>% would have precendence ('order of operations') problems also. A + B %=>% C is equivalent to A + ( B %=>% C) and I don't think that is what you want. as.list(quote(A + B %=>% C)) shows the first branch in the parse tree. The following function, str.language, shows the entire parse tree, as in > str.language(quote(A + B %=>% C)) `quote(A + B %=>%
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all I tried and tried and tried, but I still fail in creating a form with proper validation and stuff for foreign keys... So I''d really like to get some help here. I''m creating a booking site for DJ''s, and for every booking one can choose one of different countries: class Booking < ActiveRecord::Base validates_presence_of :country_id
2009 Jan 14
3
Casting lists to data.frames, analog to SAS
I have a specific question and a general question. Specific Question: I want to do an analysis on a data frame by 2 or more class variables (i.e., use 2 or more columns in a dataframe to do statistical classing). Coming from SAS, I'm used to being able to take a data set and have the output of the analysis in a dataset for further manipulation. I have a data set with vote totals, with one
2006 Jul 08
6
Trying to create pulldown select menu for US State form fiel
I noticed there is a country_select. Is there anything like us_state_select maybe? More specifically - I''m wondering if I manually have to populate an array with all the U.S. state abbreviations so users can select which state they live in while entering their mailing address. -- Posted via http://www.ruby-forum.com/.
2006 Jul 02
1
multitable form
Hi all, Although I''m experienced with programming I''m a beginner with ruby, RoR and MVC So I follow examples from books and so on and all is ok. I can make a model who is a class and who match to a table in my database and then I generate pretty forms on a webpage. I would like to know how I can do to make forms who interact with more than one table. For an example lets
2012 Nov 17
2
Help needed for error in foreign key validation
I have two models bank and country. User should only associate a Bank with a country id present in the country table and I put validates presence of country to enforce it but i get error mysql2::Error: Unknown column ''countries.bank_id'' in ''where clause'': SELECT `countries`.* FROM `countries` WHERE `countries`.`bank_id` = 17 LIMIT 1 when updating the bank
2005 May 05
3
body of non-visible function
Hello, Is there any possibility in R to see the body of the non-visible function, for example princomp? If I do : > methods(princomp) so, I get that princomp.default and princomp.formula are non-visible functions and body(princomp.default) doesnt show it. In particular, I guess I have a very nave question Id like to see how scores calculation is implemented in the function princomp.