Creating Empty Matrix in R
Many times, we need an empty matrix and want to fill it later as per our requirement. Below are a few examples to achieve the this article, we will be…
Creating a Matrix in R
A matrix, as we all know, is a rectangular array arranged in rows and columns. In terms of programming language, matrix is a collection of data-elements arranged in a two-dimensional…
R: Create vector of zeros
Vector of zeros is sometimes required to initialize a vector with values or neutralize it after performing a few operations. In this article, we will be creating a vector of…
R: Find the index of an element in the vector ( 4 ways )
Often, we have a requirement to find out the index of the first occurrence of an element in the vector so that some operations can be performed on the same.…
R: Create empty vectors and add new items to it
Empty vectors in R are the vectors of length zero. We often need to create empty vectors in a program so that elements can be added later as and when…
Creating Vectors in R Programming (6 ways)
Vectors are fundamental data structures in R with logical, integer, double, character, and raw data types. Vectors are somewhat similar to what is arrays in C. In this article, we…
R: Set working directory
In this article, we will be setting up a working directory in R using different techniques and will also verify if that has been set correctly. (more…)