Here is an excerpt from the baby-name data in "DCF::BabyNames"
.
name | sex | count | year |
---|---|---|---|
Taffy | F | 19 | 1970 |
Liliana | F | 162 | 1973 |
Stan | M | 55 | 1975 |
Nettie | F | 45 | 1978 |
Kateria | F | 8 | 1980 |
Nataki | F | 5 | 1982 |
Danyell | M | 13 | 1984 |
Ahmet | M | 6 | 1986 |
For each of the following, say whether the variable is quantitative or categorical:
Taffy
: year
: sex
: name
: count
: Newcomers often get confused about the difference between a quoted character string and an object name. You’re going to explore the difference using the View()
function. View()
lets you see the contents of objects.
help()
function, for the data table msleep
(in the ggplot2
package).View( msleep )
"msleep"
rather than the name of the object. That is, `View( “msleep” ).In your own words, briefly explain the difference between msleep
and "msleep"
.
Bring into your R session the data table named WorldCities
from the DCF
package. Use View( WorldCities )
to look at the data.
help()
, say what the date
variable means.There are several small, example data tables in the ggplot2
package. Look at the msleep
data table by using the View()
function with the name of the object as an argument.
brainwt
variable?vore
variable?There are several small, example data tables in the datasets
package. Look at the Seatbelts
data table using the View()
function and the name of the object as an argument.
front
variable?country
?Say what content is associated each of the following filename extensions.
.csv
.Rmd
.jpg
.Rdata
.docx
.html
.ppt
.png
.txt
.xls
What is the path name of the files in this directory?
Which characters can be used in an object name?
Here are a few characters: . , ; _ - ^ [space] ( )
Which of those characters can be used in a quoted character string?
The date()
function returns an indication of the current time and date.
date()
take? How did you find out?date()
.For each of the following assignment statements, say what is the mistake.
ralph <- sqrt 10
ralph2 <-- "Hello to you!"
3ralph <- "Hello to you!"
ralph4 <- "Hello to you!
ralph5 <- date()
These questions should be easy to answer if you use the appropriate commands to load, view, or get documentation on the datasets.
CountryData
?tfat
measure in the NHANES
data table?WorldCities
?BabyNames
?party
in the registeredVoters
data table, and what does each code stand for?Please use the comment system to make suggestions, point out errors, or to discuss the topic.