Variable name restrictions in R

You might be looking for the discussion from ?make.names: A syntactically valid name consists of letters, numbers and the dot or underline characters and starts with a letter or the dot not followed by a number. Names such as “.2way” are not valid, and neither are the reserved words. In the help file itself, there’s … Read more

Should I use a data.frame or a matrix?

Part of the answer is contained already in your question: You use data frames if columns (variables) can be expected to be of different types (numeric/character/logical etc.). Matrices are for data of the same type. Consequently, the choice matrix/data.frame is only problematic if you have data of the same type. The answer depends on what … Read more