I have a variable, and for some reason R has added an extra "X" in the beginning of each. Is this a common occurrence that I could have avoided?
Anyhow, below is my data (currently the variable is stored in a list):
X1
X5
X33
X37
...
> str(rc1_output)
chr [1:63, 1:3] "X1" "X5" "X33" "X37" "X52" "X645" "X646" ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:63] "X1" "X5" "X33" "X37" ...
..$ : chr [1:3] "" "Entropy" "Subseq."
> dput(head(rc1_output))
structure(c("X1", "X5", "X33", "X37", "X52", "X645", "0", "0",
"0", "0", "0", "0", "0.256010845762264", "0.071412419435563",
"0.071412419435563", "0.071412419435563", "0.071412419435563",
"0.071412419435563"), .Dim = c(6L, 3L), .Dimnames = list(c("X1",
"X5", "X33", "X37", "X52", "X645"), c("", "Entropy", "Subseq."
)))
How can I loop through all rows of the variable and remove the X
?