bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

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)))
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror