Given dayOfWeekName<-c("Mon","Tue","Wed","Thu","Fri","Sat","Sun"); dayOfWeekOrdinal<-c(1,2,3,4,5,6,0); dayOfWeekWorkDay<-c(TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE);
weekProfile<-list(dow=dayOfWeekName,dowI=dayOfWeekOrdinal,dowW=dayOfWeekWorkDay) 1. How can I conditionally get dow, dowI, and dowW from weekProfile? If another 'arrangement' of this list object will make this task easier, please advise. 2. What is the point of the list object? I know that when mixed data types need to be held together, then the only option is to use the list data structure. If I were to hold recurring (Name, Salary, DateOfBirth) (i.e. character, integer and date values) in a list object, what would be the 'optimal' arrangement? Would that be as the components of weekProfile above? Or will this be better. Either: personalDetail<- list(rbind(c(Name,Salary,DateOfBirth),c(Name,Salary,DateOfBirth))); Thanks for sharing your insight. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.