Cost Lab 1
Cost Lab 1
2. R-Datatypes:
i. Logical
ii. Numeric
iii. Integer
iv. Complex
v. Character
vi. Raw
3. R — Vectors:
Vector Creation
6. R-Arrays:
• Creating R - Array:
Naming Dimensions of Array
8. R Data Frames:
Creating R-Data Frames:
>
employee.emp_name employee.DOJ
1 Sadik 2012-08-07
2 Pinky 2013-01-15
3 Manoj 2013-06-08
4 Krishna 2014-11-10
5 Sonam 2015-06-05
>
emp_id salary
1 1001 56000
2 1002 49000
3 1003 45000
4 1004 35000
5 1005 28000
>
>
> # Extracting 2nd and 5th row with 2nd and 4th column
emp_name DOJ
2 Pinky 2013-01-15
5 Sonam 2015-06-05
>
>
>
>
Adding Rows:
# Expanding Data Frames
>
>
>
>
>
Lab 2
AIM: Create a Matrix using R and Perform the operations addition, inverse, transpose and multiplication operations.
SOURCE CODE & OUTPUT: