Hello,

I have a simple Data table like below:
> Data
  V1 V2
1  1  3
2  5  4

And I like to apply a switch to all the values of the table.
Exp for one value:
switch(as.character(Data[2,1]),
       "1"="One",
       "2"="Two",
       "3"="Three",
       "4"="Four",
       "5"="Five"
)

What would be the best way to do this?

Thank you.

Pooya





THIS E-MAIL IS FOR THE SOLE USE OF THE INTENDED RECIPIENT(S) AND MAY CONTAIN
CONFIDENTIAL AND PRIVILEGED INFORMATION.ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE
OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE
CONTACT THE SENDER BY REPLY E-MAIL AND DESTROY ALL COPIES OF THE ORIGINAL E-MAIL.
	[[alternative HTML version deleted]]

