एक list बनाना
आइए अपनी पहली list बनाएँ! किसी list का निर्माण करने के लिए आप list() फंक्शन का उपयोग करते हैं:
my_list <- list(comp1, comp2 ...)
list फंक्शन के आर्ग्युमेंट्स ही list के components होते हैं. याद रखिए, ये components matrices, vectors, अन्य lists, … हो सकते हैं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
R परिचय
अभ्यास निर्देश
एक list बनाएँ, जिसका नाम my_list हो, और जिसमें my_vector, my_matrix और my_df वैरिएबल list components के रूप में शामिल हों.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Vector with numerics from 1 up to 10
my_vector <- 1:10
# Matrix with numerics from 1 up to 9
my_matrix <- matrix(1:9, ncol = 3)
# First 10 elements of the built-in data frame mtcars
my_df <- mtcars[1:10,]
# Construct list with these different elements:
my_list <-