The following vectors are built into R: state.name : a character vector consisti
ID: 3268909 • Letter: T
Question
The following vectors are built into R:
state.name : a character vector consisting of all 50 US states.
state.region : a character vector consisting of the regions each state is contained in (North, West, etc.)
state.area : a numeric vector consisting of the areas of each state (in square miles).
Calculate each of the following with one R command. specify both the exact R command that you used and the result of that command.
* The area of New Jersey.
* The list of all states in the "South" region.
* The average areas of all states in the "South" region.
Explanation / Answer
answer
Description
Data sets related to the 50 states of the United States of America.
Usage
Details
R currently contains the following “state” data sets. Note that all data are arranged according to alphabetical order of the state names.
state.abb:
character vector of 2-letter abbreviations for the state names.
state.area:
numeric vector of state areas (in square miles).
state.center:
list with components named x and y giving the approximate geographic center of each state in negative longitude and latitude. Alaska and Hawaii are placed just off the West Coast.
state.division:
factor giving state divisions (New England, Middle Atlantic, South Atlantic, East South Central, West South Central, East North Central, West North Central, Mountain, and Pacific).
state.name:
character vector giving the full state names.
state.region:
factor giving the region (Northeast, South, North Central, West) that each state belongs to.
state.x77:
state {datasets}Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.