search for: county

Displaying 20 results from an estimated 1346 matches for "county".

Did you mean: count
2006 Aug 10
6
passing hash from controller to view and pluralization?
hi, i have 2 tables (counties and towns). counties has_many towns and towns belong_to counties. now my question: i thought i would need to do is say @counties = Counties.find(:all). should that not return to me all counties in the counties table WITH all towns associated with each county? in my view i was getting error when doing this if(counties.has_towns?) saying undefined has_towns methods... another question about plurulization. if i were to say @county vs @counties, is there a difference? would RoR assume i just want information for 1 county? or does RoR treat it li...
2005 Dec 23
2
Bizarre problems with AJAX / missing variables
...; for #<#<Class:0x8efa1ec>:0x8efa138> This was when I added in rawcode to the locals for the partial for debugging. Again, everything works fine on the development machine, and I get the rawcode displayed in the browser as expected. At one stage I had the following code: <% unless county.nil? %> foo <% else % bar <% end %> ...and I didn''t assign county a value at all if I didn''t know it. I checked to see if county was set by checking if it was nil. When I first noticed it was giving me problems on the demo server, I explicitly set it to nil (see the c...
2012 Jan 16
1
Package "maps": what is the name of county # 2395?
I am using "maps". I am running the following code to get this list of all the counties: map('county', plot=FALSE)$names In the output, all counties have first the state listed and then, after a comma, the name of the county. However, county # 2395 (State = south dakota) has no county name. Anyone knows what this county is? Thank you! -- Dimitri Liakhovitski marketfusionanalytics.com
2009 Oct 24
2
Problem Removing Border Lines in Maps Package
I'm working with the nationwide county maps data, and trying to remove the internal county boundary lines. The only map() function parameter that I've found that gets me anywhere close to my desired result leaves small white segments on parts of the map. I believe this is due to the low resolution, because when I look at individua...
2012 Jan 13
1
Coloring counties on a full US map based on a certain criterion
...d on a criterion one establishes (i.e., all counties I assign the same number should be the same color)? I explored a bit and looks like the package "maps" might be of help. library(maps) One could get a map of the US: map('usa') One could get countries within a US state: map('county', 'iowa', fill = TRUE, col = palette()) Would it be possible to read in a file with counties and their assignments (some counties have a 1, some counties have a 2, etc.) and then have one map of the US with counties colored based on their assignment? Thanks a lot for any hint! -- D...
2007 Sep 27
1
R: anova.Design
Dear All: I tried to replicate a case study described by Prof. Harrell in Chapter 7 of his Regression Modeling Strategies book, but failed on using anova.Design to reproduce his table 7.1, Following is the code: rm(list=ls()) library(Hmisc) library(Design) getHdata(counties) counties$older <- counties$age6574 + counties$age75 label(counties$older) <- '% age >= 65, 1990'
2006 Dec 27
3
counties in different colours using map()
Hi, I would like to plot a map of US counties using different colors. map() seems to be the function to use, e.g. library(maps); map('usa'); map('county', 'colorado', add=T,fill = T, col=c(1:5)) plots Colorado counties using colours 1 to 5. However, I want each color to represent a certain value - a value to be picked from a data frame. This code should show a correspoding map at the level of states: state.names <- system('tr...
2007 Aug 31
3
by group problem
I am working with census data. My columns of interest are... PercentOld - the percentage of people in each county that are over 65 County - the county in each state State - the state in the US There are about 3100 rows, with each row corresponding to a county within a state. I want to return the top five "PercentOld" by state. But I want the County and the Value. I tried this... topN <- f...
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users, I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the handouts *Regression Modeling Strategies* ( http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the following code. Could any one help me figure out how to solve this? setwd('C:/Rharrell') require(rms) load('data/counties.sav') older <- counties$age6574 + counties$age75
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 following: counties_zip_codes (county_id, zip_code), as this removes the need to join with the 42K record zip_codes table. However, when I do the following in the my model: class...
2007 Oct 19
1
plot.Design
Dear R-users: I am trying to use the following code to reproduce the figures on page 140 of Prof. Frank Harrell's book 'Regression Modeling Strategies': rm(list=ls()) options(width=128) library(Hmisc) library(Design) getHdata(counties) counties$older <- counties$age6574 + counties$age75 label(counties$older) <- '% age >= 65, 1990' counties$pdensity <-
2009 Feb 26
1
error message and convergence issues in fitting glmer in package lme4
I'm resending this message because I did not include a subject line in my first posting. Apologies for the inconvenience! Tanja > Hello, > > I'm trying to fit a generalized linear mixed model to estimate diabetes prevalence at US county level. To do this I'm using the glmer() function in package lme4. I can fit relatively simple models (i.e. few covariates) but when expanding the number of covariates I usually encounter the following error message. > > gm8 <- > glmer(DIAB05F~AGE+as.factor(SEX)+poolt+poolx+povert...
2011 Mar 22
2
adding vertical segments to an xyplot in lattice
I have a dataframe that looks like this: > str(chr) 'data.frame': 84 obs. of 7 variables: $ county: Factor w/ 3 levels "Broome","Nassau",..: 3 3 3 3 3 3 3 3 3 3 ... $ item : Factor w/ 28 levels "Access to healthy foods",..: 21 19 20 18 16 3 2 6 17 8 ... $ value : num 8644 15 3.5 3.9 7.7 ... $ low : num 7897 9 2.5 2.6 7 ... $ high : num 9390 22 4.5 5.2 8.4...
2008 Aug 28
0
USING TOBIT OR WHAT ALTERNATIVE WHEN DATA ARE PANEL AND HETEROSKEDASTIC AND PROBABLY AUTOCORRELATED?
Please, I seek expertise and advice, possibly leads to R packages or stats literature. My data: measurements of economic variables for each county of California over 37 years. My dependent variable is square feet of office floor space permitted to be added in a county. Independent variables include for example change in number of office jobs in same county same year (and lagged years). Smaller (less populous) counties have many years in...
2012 May 25
0
plotting sorted factors
...The problem is that the factors are not orderd by the row number. If you want to check their order, use str(sortdata) and you'll see Santa-Rosa was attributed factor level 4 (in the output, first variable, the 3rd and 4th). Try the following. sortdata <- read.table(text=" county year x1 x2 x3 x4 x5 x6 x7 rank 141 Escambia 2002 6.50 5.95 13.70 20.64 20.49 65.86 100.65 1 142 Escambia 1999 7.31 5.33 15.67 18.94 20.99 73.22 100.53 1 539 Santa-Rosa 2006 10.70 5.99 11.33 15.34 18.69 57.72 76.03 2 540 Santa-Rosa 2007 13.31 5.8...
2010 Sep 22
2
cwhmisc package error
R-listers, I'm working on a project where I need to get the lowercase of the county variable in a dataset alike to the example below (only difference is that the full dataset has all the states and counties in the southeast United States). I keep getting this strange error with the lowerize function (which didn't occur the first few times I use the code below), and oddly enou...
2005 Mar 22
3
mixtures as outcome variables
Dear R-users, I have an outcome variable and I'm unsure about how to treat it. Any advice? I have spending data for each county in the state of California (N=58). Each county has been allocated money to spend on any one of the following four categories: A, B, C, and D. Each county may spend the money in any way they see fit. This also means that the county need not spend all the money that was allocated to them. The data s...
2006 Mar 10
2
trimming a factor
Hi, I have the following dataframe. The County Column has many empty spaces at the end. I want to cut out the empty space and put them back into the dataframe. How can this be done? > head(DailyCounty) Date County GFCPer GFCEquip Acre nFires Date2 1 2001-01-04 00:00:00 Appling 1 1 0....
2005 Feb 19
2
best analysis method : for time series ans cross sectional data
...What I 'd like to analyze with a large data on building permits is to find time series effect of urban policy on buildings as well as cross-sectional effects in any. In 1990 the specialZone urban policy was introduced. I guess that the effects of this specialZone policy would be different from countys. There are counties that do not welcome this specialZone forced to design it. One of the important aims is to find 1) time series effect using Dummy variable, 2) cross-sectional effects using specialZones variable below. The data has items like year(1970-2000), floorSpace, county, specialZones...
2010 May 25
2
segplot (latticeExtra)
...: ---<--------------------cut here---------------start------------------->--- library(latticeExtra) data(USCancerRates) uscr.w <- subset(USCancerRates, state == "Washington") uscr.w$year <- gl(4, 10, length=nrow(uscr.w), labels=format(seq(2001, 2004))) segplot(reorder(factor(county), rate.male) ~ LCL95.male + UCL95.male | year, data=uscr.w, scales="free") ---<--------------------cut here---------------end--------------------->--- This still plots all levels of county in every panel. Based on a similar need for dotplot in another thread, the following...