Q:

Write a R program to create a list of elements using vectors, matrices and a functions. Print the content of the list

0

Write a R program to create a list of elements using vectors, matrices and a functions. Print the content of the list.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

l = list(
  c(1, 2, 2, 5, 7, 12),  
  month.abb,
  matrix(c(3, -8, 1, -3), nrow = 2),
  asin
)
print("Content of the list:")
print(l)

Sample Output:

[1] "Content of the list:"
[[1]]
[1]  1  2  2  5  7 12

[[2]]
 [1] "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"

[[3]]
     [,1] [,2]
[1,]    3    1
[2,]   -8   -3

[[4]]
function (x)  .Primitive("asin")

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now