0% found this document useful (0 votes)
14 views4 pages

Unit 1 &2

Uploaded by

Bulbul Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Unit 1 &2

Uploaded by

Bulbul Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Unit 1-R basics

Introduction: Basic features of R, advantages of using R, Limitations, R resources,


Arithmetic and objects, Math, Variables, and Strings, Vectors and Factors, Vector
operations.
About R:-R is an open-source programming language that is widely used as a
statistical software and data analysis tool. R generally comes with the Command-line
interface. R is available across widely used platforms like Windows, Linux, and
macOS. Also, the R programming language is the latest cutting-edge tool.

Programs can be written in R in any of the widely used IDE like R Studio, Rattle,
Tinn-R, etc. After writing the program save the file with the extension .r. To run the
program use the following command on the command line:

R file_name.r

arithmetic

https://intellipaat.com/blog/tutorial/r-programming/operators/

Object

https://www.geeksforgeeks.org/r-objects/

Vector and factor

https://intellipaat.com/blog/tutorial/r-programming/vectors/
https://www.tutorialspoint.com/r/r_factors.htm
strings
https://www.geeksforgeeks.org/r-strings/
Math
https://www.w3schools.com/r/r_math.asp
Variable
https://www.geeksforgeeks.org/r-variables/
Vector operation
https://www.geeksforgeeks.org/operations-on-vectors-in-r/
Unit 2 Data structures in R

Data types, Arrays, Tables, Matrices: operations, Lists: operations, Data


frames: creation, factors, reading

Data types - Generally, while doing programming in any programming language, you
need to use various variables to store various information. Variables are nothing but
reserved memory locations to store values. This means that, when you create a
variable you reserve some space in memory.

You may like to store information of various data types like character, wide character,
integer, floating point, double floating point, Boolean etc. Based on the data type of a
variable, the operating system allocates memory and decides what can be stored in the
reserved memory.

In contrast to other programming languages like C and java in R, the variables are not
declared as some data type. The variables are assigned with R-Objects and the data
type of the R-object becomes the data type of the variable. There are many types of
R-objects. The frequently used ones are −

● Vectors
● Lists
● Matrices
● Arrays
● Factors
● Data Frames

The simplest of these objects is the vector object and there are six data types of these
atomic vectors, also termed as six classes of vectors.

Arrays -
https://www.tutorialspoint.com/r/r_arrays.htm
Tables -
https://www.geeksforgeeks.org/how-to-create-tables-in-r/
Matrices : operation
https://www.w3schools.com/r/r_matrices.asp
List : operation
https://www.w3schools.com/r/r_lists.asp
Data frame : creation
https://www.w3schools.com/r/r_data_frames.asp
https://datatofish.com/create-dataframe-in-r/#:~:text=Alternatively%2C%20you
%20may%20apply%20this,%22%2C%20...)%20)
Factors-
https://www.w3schools.com/r/r_factors.asp
Reading -
https://makemeanalyst.com/r-programming/reading-and-writing-data-to-and-from-r/

You might also like