SSCC - Social Science Computing Cooperative Supporting Statistical Analysis for Research

1.2 Functions, Packges, and Getting help

  1. 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)
  2. 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 object my_list.

    my_list <- list("a")
  3. Display the contents of my_list.

    [1] "a"