Skip to content

Instantly share code, notes, and snippets.

View VictorOmondiCDS's full-sized avatar
👨‍💻
Data Plumber

VICTOR OMONDI VictorOmondiCDS

👨‍💻
Data Plumber
View GitHub Profile
@VictorOmondiCDS
VictorOmondiCDS / operator.csv
Last active May 7, 2020 08:12
R arithmetic operators
Arithmetic Operator Function Description Example Output
+ Addition adds a number to another number 3+2 [1] 5
- Subtraction subtracts a number from another number 3 - 2 [1] 1
* Multiplication multiplies number with another number 3 * 2 [1] 6
/ Division splits a number into equal parts 3/2 [1] 1.5
^ Exponentiation raising a number to the power of another number 3 ** 2 [1] 9
%% Modulo returns the remainder of the division 3 %% 2 [1] 1
@VictorOmondiCDS
VictorOmondiCDS / calculating_age.r
Created May 7, 2020 08:14
Performing Arithmetic Operations in R
year_of_birth = 2001
current_year = 2020
age = current_year - year_of_birth
age
# My year of Birth
year_of_birth = 2001
# The Current Year
current_year = 2020
# Calculating my age by subtracting year_of_birth from the current_year
age = current_year - year_of_birth
age
my_age = 14
class(my_age)
my_weight = 90.6
class(my_weight)
my_name = "Victor" #Note how the quotation marks on the right indicate that "Victor" is a character
class(my_name)
is_teenager = TRUE
@VictorOmondiCDS
VictorOmondiCDS / index.html
Last active June 6, 2020 09:25
Esther Njeri Kanini | Portfolio Website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Esther Njeri Kanini Portfolio | HOME</title>
</head>
<body>
<nav>
<div class="logo"></div>