bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / R / Code / R_Prac-6.r

R_Prac-6.r (457B)


      1 # Program to access List elements, modify a List Element, add items to List, 
      2 # Remove items from a List, length of List.
      3 
      4 l <- list("Amit", 19, "Madhyamgram", 94.5)
      5 print("Initial list:")
      6 print(l)
      7 
      8 l[[4]] = 95.46
      9 print("after modifing last element: ")
     10 print(l)
     11 
     12 l[length(l) + 1] <- "hello"
     13 print("after adding new element:")
     14 print(l)
     15 
     16 l[3] <- NULL
     17 print("after deleting a element: ")
     18 print(l)
     19 
     20 print(paste("length of the list after modifing:", length(l)))