Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下向量
years <- c(1996,1997,1998,1999,2000, 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010)
我希望使用 for 循环为向量中的每个数字创建一个列表,列表的名称应该与数字相同。谢谢您的帮助。
yearlist <- setNames(vector(length(years), mode="list"), years)