Basic Data Structures in R

The basic data structures in R can be divided in to two types Types of data structures Homogeneous All the elements in the data structure are of same type (string, number, boolean etc) Heterogeneous The elements in the data structure can be of mixed type. Basic Data structures in R Here are the basic data … Read more

Source R File

In this tutorial we look at how to Source R File from the console. R commands can be run from a file using the source command. create a test file called test.R vi test.R add the following line in the file cat(“Sourcing from R file\n”) Now open R and fire this command (give the absolute … Read more

List all Objects in R

All entities in R are called objects. They can be arrays, numbers, strings, functions. In this tutorial we look at how to list all objects in R. Get a list of all objects function name : objects() or ls() the objects() or ls() function can be used to get a vector of character strings of … Read more

Assignment Operators in R

Two important assignment operators in R are <- and = . Lets look at some examples. This first example assignes 3 to variable x. Notice that a space before and after the assignment operator makes the code more readable. > x <- 3 > x [1] 3 > It is also possible to chain assignments … Read more