R_Code-8.r (365B)
1 # Create a list named list1 containing the number 24, 2 # the string "Sabby", the float 5.4, and the string "Nepal". 3 # Then, write the code using the append() function to add the number 3.14 to the very end of this list. 4 5 list1 <- list(24L, "Sabby", 5.4, "Nepal") 6 print("Before update") 7 print(list1) 8 print("After Update") 9 list1 <- append(list1, 3.14) 10 print(list1)