In this tutorial, we will be covering basics of data manipulations using in-built R functions. For the basics, we will be using two inbuilt datasets in R for practice purposes: airquality (you can call this out directly) Data Viewing head(<dataframe>) - This allow you to see the first 5 rows of a dataset head(airquality) Output: ## … Continue reading R Tutorial 6: Data Manipulation

# Author: Fan Ting Wei

For/While Loops So, what's a loop? A loop allows you to execute a series of action over and over again within a few lines of code. For the concept of loops, we will be using the Fibonacci Sequence as an example. A Fibonacci sequence is where a number is a sum of the two numbers … Continue reading R Tutorial 5: Basic Programming Continued

Before we start off the chapter on data structure, this might be a little disorientating for people who learnt any other programming language, but R starts indexing from 1 instead of 0. Vectors So what's a vector? Vector is a type of R Object, that allows you to store a sequence of data elements of … Continue reading R Tutorial 4: Data Structures

How to write code R commands can be either written onto a R script or directly into the console pane. In the R script, you can either press the run button on top, or Ctrl+Enter for Windows, and Command+Enter. Let's do some quick math 😉 In R Script: 2+2 Output: [1] 4 4-1 Output: [1] … Continue reading R Tutorial 3: Basic Programming