You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (length(include) >0) {
if (regions_%in% c("counties", "county")) {
df<-df[df$fips%in%include, ]
} else {
df<-df[df$full%in%include|df$abbr%in%include|df$fips%in%include, ]
}
}
The body of the if statement should be changed to:
if (length(include) >0) {
df<-df[df$full%in%include|df$abbr%in%include|df$fips%in%include, ]
}
This should work because both the county and state map files have columns fips, full, and abbr.
Updating this function also has the added side-effect of allowing users to specify any combination of states and counties to include using either FIPS code, state abbreviation, state name, or a mixture of the three.
The text was updated successfully, but these errors were encountered:
The county map should be able to display only counties in certain states using the
include
parameter.For example,
This can be fixed at this location in usmap.R:
The body of the
if
statement should be changed to:This should work because both the county and state map files have columns
fips
,full
, andabbr
.Updating this function also has the added side-effect of allowing users to specify any combination of states and counties to include using either FIPS code, state abbreviation, state name, or a mixture of the three.
The text was updated successfully, but these errors were encountered: