Supporting Statistical Analysis for Research
1.2 Functions, Packges, and Getting help
Find out how to create an object with a class of
list. There is a function in both R and Python to make a list object.A list is an object that holds an ordered set of values. List objects are included in the base functionality of both R and Python.
List are useful stuctures in both R and Python. List objects and their uses will be explained further in later chapters.
list_object <- list("i", 52)Use the function you found in problem 1 to create a list object with only one item, an
a, as the sequence of values. Name this list objectmy_list.my_list <- list("a")Display the contents of
my_list.my_list[[1]] [1] "a"