Maithula Chandrashekhar
2011-Feb-03 18:51 UTC
[R] I want to ask user to create a typical matrix, otherwise there should be some error displaying...
Dear all, I am into some bigger project and in implementing that, I
have come across a problem, wherein I have to ask user to create a
Matrix with all elements either NA value or some "Date" object,
preferably in mm/dd/yy format. Therefore I would like to force user to
create following sort of matrix, otherwise there should be some error
displaying:
userMatrix = matrix(NA, 4, 6)
userMatrix[1,2] = userMatrix[4,3] = userMatrix[2,6] =
as.Date("2011-01-03")
Can somebody give me some hint on how to accomplish above task?
Thanks for your time.