Basic Data Types

2024-02-14

We Have Done

  • Homework 2:
    • Save files

    • Read instructions

      • “Copy the text after the initial command”

      • “What is different? What is the same?”

    • Mainly three modes: interactive, source and script

      • Path/Where to run/How code is run/What are the outputs/Variables in environment

We have read

Variables and Basic Data

  1. Variables and Basic Data Types

    • Assigning variables

    • variable types and conversion

      R Python
      logical/ boolean bool
      integer int
      numeric (different precisions) float
      character str

Functions and Libraries

  1. Using Functions and Libraries
    • Mathematical operations
    • Operation order follows mathematical rule
    • String operation: easier in Python, little bit more work in R paste
    • Functions
      • Take arguments and mostly have return values
      • Method - special type of function
    • Libraries/ packages
      • Package management:
        • Virtual environments
        • installing packages at the user or system level
      • Installing packages and loading packages
      • Pipe
        • Heavily used in R data manipulation
        • Not so much in Python

Next Time

We will get to know basic data structures

Please read:

Data Structures

Homework3

  • Download and save Homework3 raw content
    • Click the link
    • Copy the raw content
    • Save to a Quarto file under Source mode
    • Name the file as 03-Lastname-Firstname.qmd
    • Submit in .qmd file