<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: VICTOR OMONDI</title>
    <description>The latest articles on DEV Community by VICTOR OMONDI (@victoromondi1997).</description>
    <link>https://dev.to/victoromondi1997</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F264370%2F266ae681-3d01-48b9-943a-c917bdc50fd2.png</url>
      <title>DEV Community: VICTOR OMONDI</title>
      <link>https://dev.to/victoromondi1997</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/victoromondi1997"/>
    <language>en</language>
    <item>
      <title>Basic Introduction To R</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Wed, 06 May 2020 17:01:13 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/basic-introduction-to-r-4ajh</link>
      <guid>https://dev.to/victoromondi1997/basic-introduction-to-r-4ajh</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773575369%2FcX7Y3eKBT.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773575369%2FcX7Y3eKBT.jpeg" alt="Teal, Yellow, &amp;amp; Red Creative Colorful Goal Setting Presentation.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article we will cover the intro basics to &lt;a href="https://www.r-project.org/about.html" rel="noopener noreferrer"&gt;&lt;strong&gt;R Programming Language&lt;/strong&gt;&lt;/a&gt;. This article is meant for people willing to start programming in R, beginners in R who are willing to expand their already gained knowledge in R, or people willing to start their Data Science journey using R programming language. If you are familiar with other programming languages, getting to understand R programming language will be as easy as drinking water.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1257981772425502720-365" src="https://platform.twitter.com/embed/Tweet.html?id=1257981772425502720"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1257981772425502720-365');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1257981772425502720&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773782511%2FPr1DkpqrU.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773782511%2FPr1DkpqrU.jpeg" alt="Basics To R Programming Language.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is R?
&lt;/h1&gt;

&lt;p&gt;Well! It is a programming language, often used in statistics and data science, but let's get a clear definition from  Wikipedia &lt;/p&gt;
&lt;div class="ltag__wikipedia--container"&gt;
  &lt;div class="ltag__wikipedia--header"&gt;
    &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fwikipedia-logo-0a3e76624c7b1c3ccdeb9493ea4add6ef5bd82d7e88d102d5ddfd7c981efa2e7.svg" class="ltag__wikipedia--logo" alt="Wikipedia Logo"&gt;
    &lt;a href="https://en.wikipedia.org/wiki/R_(programming_language)" rel="noopener noreferrer"&gt;R (programming language)&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="ltag__wikipedia--extract"&gt;&lt;p&gt;&lt;b&gt;R&lt;/b&gt; is a programming language for statistical computing and data visualization. It has been adopted in the fields of data mining, bioinformatics, and data analysis.&lt;/p&gt;&lt;/div&gt;
  &lt;div class="ltag__wikipedia--btn--container"&gt;
      &lt;a class="ltag__wikipedia--btn" href="https://en.wikipedia.org/wiki/R_(programming_language)" rel="noopener noreferrer"&gt;View on Wikipedia&lt;/a&gt;&amp;gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;According to Wikipedia:&lt;/strong&gt; R is a programming language and free software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing. The R language is widely used among statisticians and data miners for developing statistical software and data analysis.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;R language provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible. &lt;a href="https://www.r-project.org/about.html" rel="noopener noreferrer"&gt;READ MORE&amp;gt;&amp;gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Install and Getting Started With R
&lt;/h1&gt;

&lt;p&gt;Since this article focuses on the basics of R programming language, for instruction on how to install R and R studio please Check this &lt;a href="https://courses.edx.org/courses/UTAustinX/UT.7.01x/3T2014/56c5437b88fa43cf828bff5371c6a924/" rel="noopener noreferrer"&gt;Edx Article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have R and Rstudio installed, let's proceed to the business of the Day.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;What is R&lt;/li&gt;
&lt;li&gt;How to Install and Getting Started With R&lt;/li&gt;
&lt;li&gt;
Intro To R Basics

&lt;ul&gt;
&lt;li&gt;
Comments
&lt;/li&gt;
&lt;li&gt;R Arithmetic Operators&lt;/li&gt;
&lt;li&gt;Basic Data Types in R&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;More Resources&lt;/li&gt;

&lt;/ul&gt;

&lt;h1&gt;
  
  
  Intro To R Basics
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Hello, World!
&lt;/h2&gt;

&lt;p&gt;It's now like a rule that the first code you write when beginning to learn a programming language is a code that will display &lt;code&gt;Hello, World!&lt;/code&gt; on the screen.&lt;/p&gt;

&lt;p&gt;In order to display on the screen, R provides the &lt;a href="https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/print" rel="noopener noreferrer"&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/a&gt; function.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;print&lt;/code&gt; prints its argument and returns it &lt;em&gt;invisibly&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In order to print &lt;code&gt;Hello, World!&lt;/code&gt; in R, you need to pass the string &lt;code&gt;"Hello, World!"&lt;/code&gt; in the &lt;code&gt;print()&lt;/code&gt; function. the strings can be in double quotes &lt;code&gt;""&lt;/code&gt; or single quotes &lt;code&gt;''&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the output will be as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating and Naming Variables
&lt;/h2&gt;

&lt;p&gt;Variables helps your program claim a piece of memory when it's running. In R, variables allow you to store a value or an object. In simple terms, a variable is a named storage space. The variables created can later on be used in your program to perform various operations. &lt;br&gt;
In R, &lt;code&gt;&amp;lt;-&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt; or &lt;code&gt;-&amp;gt;&lt;/code&gt; are used as the Assignment Operator to assign values to a variable name. Before creating variables, you must adhere to the rules of creating a Variable in R.&lt;/p&gt;
&lt;h3&gt;
  
  
  Rules for Naming Variables in R
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Variable names &lt;strong&gt;MUST&lt;/strong&gt; start with a letter, it can contain a letter, number, underscore (&lt;code&gt;_&lt;/code&gt;) and period (&lt;code&gt;.&lt;/code&gt;).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;unlike other languages, &lt;strong&gt;Underscore(&lt;code&gt;_&lt;/code&gt;)&lt;/strong&gt; at the beginning of the variable name are &lt;strong&gt;NOT&lt;/strong&gt; allowed in R&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keywords &lt;strong&gt;CANNOT&lt;/strong&gt; be used to name variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Special Character like &lt;code&gt;#&lt;/code&gt;, or &lt;code&gt;&amp;amp;&lt;/code&gt; and whitespace eg tab or space &lt;strong&gt;CANNOT&lt;/strong&gt; be used in variable names&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variable names are &lt;strong&gt;Case Sensitive&lt;/strong&gt;, therefore, &lt;code&gt;my_name&lt;/code&gt; is different from &lt;code&gt;my_Name&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1256312066224332805-412" src="https://platform.twitter.com/embed/Tweet.html?id=1256312066224332805"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1256312066224332805-412');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1256312066224332805&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Below are examples of correct variable names and assignment in R&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Victor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Victor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="mf"&gt;17347.3847&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;weight_kgs&lt;/span&gt;
&lt;span class="n"&gt;weight_kgs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mf"&gt;17347.38&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  R Arithmetic Operators
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;operator&lt;/strong&gt; is a symbol that tells the compiler to perform specific mathematical or logical manipulations. R Arithmetic Operators are symbols that tells the compiler which mathematical operation to perform. R language supports the following arithmetic operators:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arithmetic Operator&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Addition&lt;/td&gt;
&lt;td&gt;adds a number to another number&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3+2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 5&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Subtraction&lt;/td&gt;
&lt;td&gt;subtracts a number from another number&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3 - 2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Multiplication&lt;/td&gt;
&lt;td&gt;multiplies number with another number&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3 * 2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 6&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Division&lt;/td&gt;
&lt;td&gt;splits a number into equal parts&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3/2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 1.5&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;^&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exponentiation&lt;/td&gt;
&lt;td&gt;raising a number to the power of another number&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3 ** 2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 9&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%%&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Modulo&lt;/td&gt;
&lt;td&gt;The modulo returns the remainder of the division of the number to the left by the number on its right&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3 %% 2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[1] 1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Let us use R arithmetic operators to calculate my age. We will use the already gained knowledge of variables and arithmetic operations we've discussed above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;year_of_birth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2001&lt;/span&gt;
&lt;span class="n"&gt;current_year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_year&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;year_of_birt&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;1] 19
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see &lt;code&gt;age&lt;/code&gt; is a variable that stores the computations done when &lt;strong&gt;subtracting&lt;/strong&gt; &lt;code&gt;year_of_birth&lt;/code&gt; from &lt;code&gt;current_year&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comments
&lt;/h2&gt;

&lt;p&gt;R makes use of the &lt;code&gt;#&lt;/code&gt; sign to add comments. Comments are added to a source code so that you and others can understand what the R code is about. Comments are not run as R code, so they will not influence your programs computation computations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# My year of Birth
&lt;/span&gt;&lt;span class="n"&gt;year_of_birth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2001&lt;/span&gt;

&lt;span class="c1"&gt;# The Current Year
&lt;/span&gt;&lt;span class="n"&gt;current_year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt;

&lt;span class="c1"&gt;# Calculating my age by subtracting year_of_birth from the current_year
&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_year&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;year_of_birth&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic Data Types in R
&lt;/h2&gt;

&lt;p&gt;There are numerous data types in R programming language, we will cover the &lt;code&gt;4&lt;/code&gt; basic types, that is, &lt;strong&gt;numerics&lt;/strong&gt;, &lt;strong&gt;integers&lt;/strong&gt;, &lt;strong&gt;logical&lt;/strong&gt; and &lt;strong&gt;characters&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Data type is the classification/categorization of data item. Everything in python is an object therefore, data types are classes and variables are the instance (object) of the data type.&lt;br&gt;
Use &lt;code&gt;class(variable_name)&lt;/code&gt; in order to understand to which data type a variable belongs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To get you started with R Basic Data types, note the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Decimal values are called &lt;strong&gt;numerics&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Natural Numbers are called &lt;strong&gt;Integers&lt;/strong&gt;, &lt;strong&gt;Integers&lt;/strong&gt; are also &lt;strong&gt;numerics&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Boolean values, eg( &lt;code&gt;FALSE&lt;/code&gt; or &lt;code&gt;TRUE&lt;/code&gt;) are called &lt;strong&gt;logical&lt;/strong&gt;. R is case sensitive, logicals must be in &lt;strong&gt;UPPERCASE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;String values/text values are called &lt;strong&gt;characters&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the following code, we will create variables then use &lt;code&gt;class()&lt;/code&gt; to check to which data type they belong.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;my_age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;my_weight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;90.6&lt;/span&gt;
&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;my_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Victor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="c1"&gt;#Note how the quotation marks on the right indicate that "Victor" is a character
&lt;/span&gt;&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;is_teenager&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TRUE&lt;/span&gt;
&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;is_teanager&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numeric&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numeric&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;character&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;logical&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  More Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;R Introduction | R Tutorial: &lt;a href="http://www.r-tutor.com/r-introduction" rel="noopener noreferrer"&gt;link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Introduction to R Online Course | DataCamp: &lt;a href="https://learn.datacamp.com/courses/free-introduction-to-r" rel="noopener noreferrer"&gt;link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Programs
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://moringaschool.com/programs/data-science-course/" rel="noopener noreferrer"&gt;Moringa School Data Science Full-Time Course&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datacamp.com/" rel="noopener noreferrer"&gt;Data Camp Data Science&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dataquest.io" rel="noopener noreferrer"&gt;Data Quest&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that marks the end of this article, keep an eye for more R articles as I cover more of R programming language to get you started in Data Science with R. Have any question? Ask Me on Twitter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/VictorOmondi1997" rel="noopener noreferrer"&gt;https://twitter.com/VictorOmondi1997&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773966695%2FRSIRtxGuO.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1588773966695%2FRSIRtxGuO.jpeg" alt="Basics To R Programming Language (1).jpg"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>r</category>
      <category>datascience</category>
      <category>programming</category>
      <category>introductinintroduction</category>
    </item>
    <item>
      <title>Project Management, what is it?</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sun, 16 Feb 2020 12:42:49 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/project-management-what-is-it-5hn9</link>
      <guid>https://dev.to/victoromondi1997/project-management-what-is-it-5hn9</guid>
      <description>&lt;p&gt;I was super exited this semester as Project Management was one of the units I was to undertake. I am currently a Third Year Student at &lt;a href="https://www.mmu.ac.ke"&gt;Multimedia University Of Kenya&lt;/a&gt;. This article outlines the clear understanding of what a project is, what a project entails and what project management is.&lt;/p&gt;




&lt;h1&gt;
  
  
  What is A Project?
&lt;/h1&gt;

&lt;p&gt;A project is a temporary undertaking that produces unique deliverables (product, services, etc.) using scarce resources.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A project is done in progression and has an owner (stakeholder).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Key Terms to note.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Temporary - has a &lt;strong&gt;start&lt;/strong&gt; and an &lt;strong&gt;end&lt;/strong&gt;.
A project should have a start and an end. The team should decide the milestone the project should undertake.&lt;/li&gt;
&lt;li&gt;Unique - something new or novel to the owner.
A project should be something new that hasn't been created before by the owner.&lt;/li&gt;
&lt;li&gt;Resources - require resources from different areas but there is the primary owner and/or sponsor.
A project should utilize other resources or tools during creation of the product&lt;/li&gt;
&lt;li&gt;Progression - a project is done in steps.
Break down or decompose the project into small independent and manageable tasks. The tasks will be performed from start to the end.&lt;/li&gt;
&lt;li&gt;Uncertainty - a project is done with a certain level of uncertainty.&lt;/li&gt;
&lt;li&gt;Management - running something to be effective. Management has 3 parts:

&lt;ul&gt;
&lt;li&gt;Planning&lt;/li&gt;
&lt;li&gt;Controlling&lt;/li&gt;
&lt;li&gt;Scheduling &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1. Planning
&lt;/h3&gt;

&lt;p&gt;Planning has 4 main things to be done&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break down or decompose the project into small independent and manageable tasks. Work Break Down structure can be used, it helps in breaking down the project.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Independent - &lt;em&gt;Can be done on its own.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Determine the order or sequence in which the tasks will be performed from start to end.&lt;/li&gt;
&lt;li&gt;Estimate the resources (time, cost, materials, machines, personnel, etc) required to complete each task.

&lt;ul&gt;
&lt;li&gt;Use analogies method of estimation. &lt;/li&gt;
&lt;li&gt;Use past data to try and find what other people did&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Masterpiece plan of how the project will look like from start to the end.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;use network diagram. it is used to determine what to be done at what time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Scheduling
&lt;/h3&gt;

&lt;p&gt;Using the network diagram produce a master timetable of when each of the tasks will be done and by who. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;use a &lt;a href="https://en.wikipedia.org/wiki/Gantt_chart"&gt;Gantt chart.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Controlling.
&lt;/h3&gt;

&lt;p&gt;Keep monitoring and evaluating the progress of the project by using the progress of the project by using the &lt;a href="https://en.wikipedia.org/wiki/Gantt_chart"&gt;Gantt Chart&lt;/a&gt; developed above and having set milestones.&lt;/p&gt;

&lt;h1&gt;
  
  
  Project Management
&lt;/h1&gt;

&lt;p&gt;Project management is a framework of tools, skills, knowledge, etc. applied to a project so as to achieve its objectives (success)&lt;/p&gt;

</description>
      <category>project</category>
      <category>projectmanagement</category>
      <category>pm</category>
      <category>projectmanager</category>
    </item>
    <item>
      <title>Agora Student Ambassador Program</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Tue, 04 Feb 2020 18:26:00 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/agora-student-ambassador-program-5ge0</link>
      <guid>https://dev.to/victoromondi1997/agora-student-ambassador-program-5ge0</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Agora Student Ambassador Program&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The Agora Student Ambassador Program aims to identify energetic, passionate, brilliant, like-minded college students across the globe who are chosen to train on Agora Real-Time Communication for AI/ML, Web/App and IoT applications.&lt;/p&gt;

&lt;p&gt;These Agora Student Ambassadors (ASA) are growing campus representatives and leaders, who are enthusiastic to learn innovative approaches to real-time communication, artificial intelligence, and voice/video technologies. By sharing their training with fellow colleagues, ASAs then act as the primary channel between campus students and Agora team.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Program Benefits for SA&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;◆ Formal Association with Agora via exclusive Agora gear and Ambassador Title.&lt;br&gt;
◆ Opportunity to connect with Agora engineers and learn via web connect sessions and office hours.&lt;br&gt;
◆ Partial travel support, speakership opportunities, and opportunities to train others.&lt;br&gt;
◆ Sponsored funds/swag to assist in hosting sessions, training others, and speaking on and off-campus to promote your work.&lt;br&gt;
◆ Contribute to shaping our product roadmap in the alpha stages of our new products.&lt;br&gt;
◆ Exclusive access to the Agora beta programs.&lt;br&gt;
◆ Annual Summit for all active ASA.&lt;br&gt;
◆ Opportunity to work/intern at Agora and its partners.&lt;br&gt;
◆ Linkedin Recommendations on successful active tenure.&lt;/p&gt;

&lt;p&gt;And many more surprises!&lt;/p&gt;

&lt;p&gt;Head on to below link to learn more and apply.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bit.ly/agorastudentambassador"&gt;https://bit.ly/agorastudentambassador&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agora</category>
      <category>agoraio</category>
      <category>ambassador</category>
    </item>
    <item>
      <title>Top YouTube Channels to Learn AI/ML/RL/DS</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sun, 02 Feb 2020 13:16:33 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/top-youtube-channels-to-learn-ai-ml-rl-ds-21l6</link>
      <guid>https://dev.to/victoromondi1997/top-youtube-channels-to-learn-ai-ml-rl-ds-21l6</guid>
      <description>&lt;p&gt;So some really important Youtube Channels in the field of Artificial Intelligence &lt;strong&gt;(AI)&lt;/strong&gt;/ Machine Learning &lt;strong&gt;(ML)&lt;/strong&gt;/ Reinforcement Learning &lt;strong&gt;(RL)&lt;/strong&gt;/ &lt;br&gt;
Data Science &lt;strong&gt;(DS)&lt;/strong&gt; are:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sentdex  &lt;a href="https://www.youtube.com/user/sentdex"&gt;https://www.youtube.com/user/sentdex&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;deeplizard &lt;a href="https://www.youtube.com/channel/UC4UJ26WkceqONNF5S26OiVw"&gt;https://www.youtube.com/channel/UC4UJ26WkceqONNF5S26OiVw&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;3Blue1Brown &lt;a href="https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw"&gt;https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Tech With Tim &lt;a href="https://www.youtube.com/channel/UC4JX40jDee_tINbkjycV4Sg"&gt;https://www.youtube.com/channel/UC4JX40jDee_tINbkjycV4Sg&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Corey Schafer &lt;a href="https://www.youtube.com/user/schafer5"&gt;https://www.youtube.com/user/schafer5&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Data School &lt;a href="https://www.youtube.com/user/dataschool"&gt;https://www.youtube.com/user/dataschool&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Two Minute Papers &lt;a href="https://www.youtube.com/user/keeroyz"&gt;https://www.youtube.com/user/keeroyz&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Welch Labs &lt;a href="https://www.youtube.com/user/Taylorns34"&gt;https://www.youtube.com/user/Taylorns34&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Luis Serrano &lt;a href="https://www.youtube.com/channel/UCgBncpylJ1kiVaPyP-PZauQ"&gt;https://www.youtube.com/channel/UCgBncpylJ1kiVaPyP-PZauQ&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Simplilearn &lt;a href="https://www.youtube.com/user/Simplilearn"&gt;https://www.youtube.com/user/Simplilearn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Great Learning &lt;a href="https://www.youtube.com/user/beaconelearning"&gt;https://www.youtube.com/user/beaconelearning&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;DeepLearning.TV &lt;a href="https://www.youtube.com/channel/UC9OeZkIwhzfv-_Cb7fCikLQ"&gt;https://www.youtube.com/channel/UC9OeZkIwhzfv-_Cb7fCikLQ&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;TensorFlow &lt;a href="https://www.youtube.com/channel/UC0rqucBdTuFTjJiefW5t-IQ"&gt;https://www.youtube.com/channel/UC0rqucBdTuFTjJiefW5t-IQ&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Deeplearning.ai &lt;a href="https://www.youtube.com/channel/UCcIXc5mJsHVYTZR1maL5l9w"&gt;https://www.youtube.com/channel/UCcIXc5mJsHVYTZR1maL5l9w&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code Bullet &lt;a href="https://www.youtube.com/channel/UC0e3QhIYukixgh5VVpKHH9Q"&gt;https://www.youtube.com/channel/UC0e3QhIYukixgh5VVpKHH9Q&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;edureka!   &lt;a href="https://www.youtube.com/user/edurekaIN"&gt;https://www.youtube.com/user/edurekaIN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Lex Fridman &lt;a href="https://www.youtube.com/channel/UCSHZKyawb77ixDdsGog4iWA"&gt;https://www.youtube.com/channel/UCSHZKyawb77ixDdsGog4iWA&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The Artificial Intelligence Channe &lt;a href="https://www.youtube.com/user/Maaaarth"&gt;https://www.youtube.com/user/Maaaarth&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;freeCodeCamp.org &lt;a href="https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ"&gt;https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CloudxLab &lt;a href="https://www.youtube.com/channel/UC8mJ6DL1Q32UWyJUceoO8Jw"&gt;https://www.youtube.com/channel/UC8mJ6DL1Q32UWyJUceoO8Jw&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Alexander Amini &lt;a href="https://www.youtube.com/user/Zan560"&gt;https://www.youtube.com/user/Zan560&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Jeff Heaton &lt;a href="https://www.youtube.com/user/HeatonResearch"&gt;https://www.youtube.com/user/HeatonResearch&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;IF YOU KNOW SOME OTHER YOUTUBE CHANNEL THEN FEEL FREE TO ADD IN THE COMMENTS&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>ds</category>
      <category>rl</category>
    </item>
    <item>
      <title>Artificial Intelligence VS Data Science VS Machine Learning</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Thu, 23 Jan 2020 09:31:15 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/artificial-intelligence-vs-data-science-vs-machine-learning-3636</link>
      <guid>https://dev.to/victoromondi1997/artificial-intelligence-vs-data-science-vs-machine-learning-3636</guid>
      <description>&lt;h1&gt;
  
  
  Artificial Intelligence
&lt;/h1&gt;

&lt;p&gt;Artificial intelligence is a very wide term with applications ranging from robotics to text analysis.&lt;/p&gt;

&lt;h1&gt;
  
  
  Machine Learning
&lt;/h1&gt;

&lt;p&gt;Machine learning is a subset of AI that focuses on a narrow range of activities.&lt;/p&gt;

&lt;h1&gt;
  
  
  Data Science
&lt;/h1&gt;

&lt;p&gt;Data science isn’t exactly a subset of machine learning but it uses ML to analyze data and make predictions about the future. It combines machine learning with other disciplines like big data analytics and cloud computing. Data science is a practical application of machine learning with a complete focus on solving real-world problems."&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ds</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Static methods in Python vs Javascript</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Thu, 23 Jan 2020 09:27:26 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/static-methods-in-python-vs-javascript-923</link>
      <guid>https://dev.to/victoromondi1997/static-methods-in-python-vs-javascript-923</guid>
      <description>&lt;h1&gt;
  
  
  Python
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;

    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nb"&gt;staticmethod&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;what_am_i&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;'I can be called by User class and also by any User instance'&lt;/span&gt;

&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;what_am_i&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Javascript
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nx"&gt;whatAmI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I can be called only by User class&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;whatAmI&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Thing to note
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  In python if we declare a static method it can be called by both the class and by any of the instances (objects) created from the class ✔️✔️✔️
&lt;/h2&gt;

&lt;p&gt;Whereas in Javascript though, if we declare any static methods, it can only be accessed by calling it from the class and not by its instances 📣✔️✔️✔️&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>static</category>
      <category>methiod</category>
    </item>
    <item>
      <title>Javascript: Printing Object in Console</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:30:19 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/javascript-printing-object-in-console-352n</link>
      <guid>https://dev.to/victoromondi1997/javascript-printing-object-in-console-352n</guid>
      <description>&lt;p&gt;If you're trying to print object in console and you're getting &lt;code&gt;[object Object]&lt;/code&gt;, then most probably you're trying to print the object as a string value. Add comma(&lt;code&gt;,&lt;/code&gt;), and not plus operator(&lt;code&gt;+&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Ex: &lt;/p&gt;

&lt;blockquote&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The value of object is: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;❌❌&lt;/p&gt;

&lt;blockquote&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The value of object is: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;✔️✔️&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Javascript Devtool Tip: Print An Array in Console</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:26:23 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/javascript-devtool-tip-print-an-array-in-console-2h99</link>
      <guid>https://dev.to/victoromondi1997/javascript-devtool-tip-print-an-array-in-console-2h99</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Trying to print an array in console?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once Try using &lt;code&gt;console.table()&lt;/code&gt; &lt;strong&gt;instead of&lt;/strong&gt; &lt;code&gt;console.log()&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>array</category>
    </item>
    <item>
      <title>API Design Tip</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:23:52 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/api-design-tip-9d</link>
      <guid>https://dev.to/victoromondi1997/api-design-tip-9d</guid>
      <description>&lt;p&gt;Don't keep Important informations as top level object key, cause then the client has to iterate through the object, find the key, relevent to him, at the same time discard the other irrelevant keys and then extract the data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DO NOT PUT IMPORTANT DATA AS OBJECT KEYS&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I faced this issue with my AI team, and had to spend a fuckload of time parsing the response&lt;/p&gt;

&lt;h1&gt;
  
  
  BAD RESPONSE DATA:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;i_am_a_unique_id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  GOOD RESPONSE DATA
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;i_am_a_unique_id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>api</category>
    </item>
    <item>
      <title>Convert to JSON in Python vs Javascript</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:19:01 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/convert-to-json-in-python-vs-javascript-67p</link>
      <guid>https://dev.to/victoromondi1997/convert-to-json-in-python-vs-javascript-67p</guid>
      <description>&lt;h1&gt;
  
  
  Python:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;

&lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Victor"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;json_py&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Javascript:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Victor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jsonJs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>javascript</category>
      <category>json</category>
    </item>
    <item>
      <title>Check if key exists in Dictionary/Object in Python vs Javascript</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:16:07 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/check-if-key-exists-in-dictionary-object-in-python-vs-javascript-58fa</link>
      <guid>https://dev.to/victoromondi1997/check-if-key-exists-in-dictionary-object-in-python-vs-javascript-58fa</guid>
      <description>&lt;h1&gt;
  
  
  Python
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nb"&gt;dict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;'platform'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'telegram'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s"&gt;'platform'&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
 &lt;span class="c1"&gt;# do something
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Javascript
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;telegram&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;platform&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]){&lt;/span&gt;

   &lt;span class="c1"&gt;// do something&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Docker Tip: To remove an image</title>
      <dc:creator>VICTOR OMONDI</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:14:16 +0000</pubDate>
      <link>https://dev.to/victoromondi1997/docker-tip-to-remove-an-image-3i0</link>
      <guid>https://dev.to/victoromondi1997/docker-tip-to-remove-an-image-3i0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;To remove an image try:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rmi &amp;lt;image_id/image_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>docker</category>
    </item>
  </channel>
</rss>
