[acs-r] acs-r Digest, Vol 13, Issue 1
Nevin Krishna
nevin.krishna at gmail.com
Tue Oct 14 14:54:09 EDT 2014
Hi Ezra,
I implemented some of the code you supplied but ran into a problem with the
portion that deals with creating a new variable to catch the sum of all
three variables. Here is the code I used:
library(acs)
us.county=geo.make(state="LA", county="*")
us.fb= acs.fetch(geography=us.county, table.number="B05006")
my.data.est=estimate(us.fb[,111:113])
my.data.est[,4]=apply(X=my.data.est, FUN=sum, MARGIN=2)
when I run my.data.est, I get the following error:
Error in `[<-`(`*tmp*`, , 4, value = c(155, 1241, 223)) :
subscript out of bounds
I am looking to get an output that looks like this:
B05006_111 B05006_112
B05006_113 combined
Acadia Parish, Louisiana 0
0 0 0
Allen Parish, Louisiana 0
25 10 35
Ascension Parish, Louisiana 0
0 0 0
Any ideas on how to correct this?
Nevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/acs-r/attachments/20141014/8d7b91a0/attachment.htm
More information about the acs-r
mailing list