I have some vectors, like this:
months <- c("january", "february", "march", "october", "december")
weekdays <- c("Sunday", "Monday", "Tuesday")
seasons <- c("Summer", "Winter", "Fall", "autumn")
And I want to create a list like this
timeWords_list <- list(months, weekdays, seasons)
Is there any way to tag the objects of the list directly with the names of the vector objects?
The result I want can be achieved like this:
names(timeWords_list) <- c("months", "weekdays", "seasons")
But, Is there any way to do that directly? Without re-writing these names (in a string vector)?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…