Question: Shorten my code, combine the two filter statements from number 1 to create a list of states in the same region as TX
Shorten my code, combine the two filter statements from number to create a list of states in the same region as TX without having the region number explicitly used in the statement.
HINT: Get the first statement to return just the region use $region txdata states filterabbreviation TX
txregion txdata$region
sameregionasTX states filterregion in txregion
printsameregionasTX
# A tibble: times
name abbreviation region areasqmiles waterareasqmiles population
Arkansas AR
Louisiana LA
New Mexico NM
Oklahoma OK
Texas TX
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
