I have very little coding experience, so please forgive me.
My project involves an analysis of TMN clinical stages as a variable included in the National Cancer Data Base.
I am trying to clean up the variable coding so that, as an example, the T stages "1A" or "c1B2" all are coded as T stage "1".
Currently, the T stage variable is coded in a column in a large data set I have uploaded to R.
How can I proceed? I am thinking of using a "if" conditional to replace each of char values.