Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm attempting to create an R code below to solve the question below, but I keep receiving an error and I am not sure what

I'm attempting to create an R code below to solve the question below, but I keep receiving an error and I am not sure what I am doing incorrectly.

Question: The variable PctRural gives the percentage of the county's residents classified as rural. Without using the choropleth function, create a three-color choropleth map that differentiates urban counties (no more than 10% rural), suburban counties (between 10% and 70% rural) and rural counties (at least 70% rural).

Code:

library(GISTools) data(georgia)

plot(georgia)

georgia$category <- ifelse(georgia$PctRural <= 10, "urban", ifelse(georgia$PctRural <= 70, "suburban", "rural"))

spplot(georgia, "category", col.regions = c("red", "yellow", "green"), main = "Three-color Choropleth Map of Georgia Counties", xlab = "Longitude", ylab = "Latitude")

Error Message:

Error in seq.default(zrng[1], zrng[2], length.out = cuts + 2) :

'from' must be a finite number

In addition: Warning messages:

1: In extend.limits(range(as.numeric(z), finite = TRUE)) :

NAs introduced by coercion

2: In min(x) : no non-missing arguments to min; returning Inf

3: In max(x) : no non-missing arguments to max; returning -Inf

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Business Mathematics With Canadian Applications

Authors: Ali R. Hassanlou, S. A. Hummelbrunner, Kelly Halliday

12th Edition

0135285011, 978-0135285015

More Books

Students also viewed these Mathematics questions

Question

1. Watch what students do with their free time.

Answered: 1 week ago

Question

What is the balance sheet identity? AppendixLO1

Answered: 1 week ago