####
#
# 01 Introduction to R
#
####


# Object: use

one <- 1

one + one

two <- one + one

two


# function

onetofive <- c(1,3,5,4,2)

sort(onetofive)


# function: arguments

sort(onetofive, decreasing = TRUE)

onetofive <- sort(onetofive, decreasing = TRUE)

# function: syntax

sqrt(9)

sample(0:100, 10, rep = FALSE)

?sample()

help(sample)

# class

class(10.27)

# class: conversion of classes

as.numeric(10.27)

as.integer(10.27)

as.character(-1)

as.numeric("anything")

5 > 10

as.character(5 > 10)