Thanks for the replies.
I hadn't considered changing the original spreadsheet to a table as
there are several different analyses using the .xlsx spreadsheet that
contains the alphanumeric data, thus requiring an alteration of all of
our code. However, the first response did prompt me to try chang
Your problem is the the data read in from the spreadsheet is probably
a 'factor' since it has a non-numeric in the column. To change it to
number you have to do the following
as.numeric(as.character(yourdata$TeamLeaderID))
What you as seeing with just the call to as.numeric is the value of
the '
All -
How can I read in a column of alphanumeric values without including
".0" on the numeric values?
Original column:
TeamLeaderID
258
342
316
U8
331
279
D1
116
235
296
...
[truncated]
leaders = read.xlsx2('FILE', sheetIndex = 1, header = T)
Column after it's been read in:
leaders$TeamLeader
3 matches
Mail list logo