search for: country_name

Displaying 8 results from an estimated 8 matches for "country_name".

2012 Nov 18
2
Question about making histogram and x must be numeric
...ave searched other posts as well but I can't find any solution to the problem I'm dealing with. I want to make a histogram from the data Telephone Lines MDGdataset <-read.csv("MDG_dataset_2010.csv", header=T) MDGdatasetAdapted <- subset(MDGdataset, select = c(Country_Code, Country_Name, Year, GNI.per.capita..Atlas.method..current.US.., Telephone.lines..per.100.people., Internet.users..per.100.people.)) MDGdatasetAdapted MDGdatasetAdapted <- na.omit(MDGdatasetAdapted) names(MDGdatasetAdapted) <- c("Code","Country","Year","GNI","Te...
2011 Sep 07
6
FactoryGirl doesnt produce unique names?!
Hey, I got following very simple test case: require ''spec_helper'' describe Country do it "should create a new instance given valid attributes" do Factory(:country) end end Factory looks like: Factory.sequence :country_name do |n| "Country #{n}" end Factory.define :country do |c| c.name Factory.next(:country_name) c.nationality "Foo nationality" c.association :currency end And the model: class Country < ActiveRecord::Base attr_accessible :currency, :code belongs_to :currency va...
2010 Aug 02
1
Drop down boxes from table data
...<% @cities.each do |city| %> <tr> <td><%=h city.city_name %></td> <td><%=h city.country_id %></td> to: <% @cities.each do |city| %> <tr> <td><%=h city.city_name %></td> <td><%=h city.country.country_name %></td> The system breaks with the following error NoMethodError in Cities#index Showing app/views/cities/index.html.erb where line #12 raised: undefined method `country_name'' for nil:NilClass Extracted source (around line #12): when attempting to display data on cities My q...
2006 Dec 09
1
WinBUGS14 and R
...) b[j] ~ dnorm (b.hat, tau.b) } b.hat ~ dnorm (0, .0001) tau.b <- pow(sigma.b, -2) sigma.b ~ dnorm (0, 100) tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100) } Here is my R code used to call BUGS: y <- abs.4diff n <- length(abs.4diff) x <- log.ineq uniq.name <- unique(country_name) J <- length(uniq.name) country <- rep (NA, J) for (i in 1:J){ country[country_name==uniq.name[i]] <- i } ineq.bugs <- list ("n", "J", "y", "country", "x") ineq.inits <- function (){ list(a=rnorm(J), b=rnorm(J), b.hat=rnorm(1...
2011 Aug 24
3
ddply from plyr package - any alternatives?
...o apply function by category stored in any column/columns. Regular loops or lapplys slow down greatly because my unique combination count exceeds 9000. Is there any available solution which allow me to apply function by category? currently my code looks like snippet below ddply(myData, c("country_name", "product_name"), myFunction) Please note that I'm looking for decently performing resolution. Thanks in advance! With regards, Adam. -- View this message in context: http://r.789695.n4.nabble.com/ddply-from-plyr-package-any-alternatives-tp3765936p3765936.html Sent from...
2006 Aug 10
5
RJS in Internet Explorer to update a list box
Hi, I''m trying some RJS to update a series of list boxes in which the user selects a state, and the following list gets updated with a list of counties, and the same for the next list of areas. My code works perfectly (albeit a bit slow) on Firefox, but on Internet Explorer it clears the list box (instead of filling it) and Netscape shows all the counties cramped together on one
2012 Aug 27
2
littler and rJava
Hello list, I'm having some difficulty getting rJava to load in littler. Even after a R CMD javareconf and a reinstall of littler, I get this: jlaing at xenon:~$ r -e "require(rJava)" Loading required package: rJava Loading required package: methods Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All, just in a spot of bother with this gem, I am trying to create a new location and get the above msg. here is my controller: class LocationsController < ApplicationController # GET /locations # GET /locations.json def index @locations = Location.all @json = Location.all.to_gmaps4rails end respond_to do |format| format.html # index.html.erb