Any questions?
r dataframe_name
datasetr dataframe_title
For this class, we will use a dataset called r dataframe_name
.
r dataframe_source
r dataframe_desc
Use the dim()
function to see how many rows (observations) and columns (variables) are in r dataframe_name
dim(
r dataframe_name)
Enter your function here:
Use the glimpse()
function to see what kinds of variables the r dataframe_name
dataset contains
glimpse(
r dataframe_name)
Enter your function here:
Recall that R has different data types -
character - "a"
, "tidyverse"
numeric - 2
, 11.5
integer - 2L
(the L
tells R to store this as an integer)
logical - TRUE
, FALSE
complex - 1+4i
(raw)
You will also come across the double datatype. It is the same as numeric
factor. A factor is a collection of ordered character variables
In addition to the glimpse()
function, you can use the class()
function to determine the data type of a specific column
class(
r dataframe_name$
r colnames(df_character_select))
class(df_character_select[[1]])
Try getting the class
of a variable:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.