开发者

convert everything import from sqlQuery to character

开发者 https://www.devze.com 2023-04-11 06:58 出处:网络
I have an xls file to be imported into R using RODBC, one of the column has the following data: 1,1A,2,3,4

I have an xls file to be imported into R using RODBC, one of the column has the following data:

1,1A,2,3,4

When I use the sqlQuery command, this column is converted into number and gives the following:

1,NA,2,3,4

How can I stop sqlQuery from converting this column? I have tried as.is=TRUE, but seems not working开发者_开发百科.

To make the question more general, I need everything to be imported text (i.e. do not try to do any conversion for me), is it possible in sqlQuery?

0

精彩评论

暂无评论...
验证码 换一张
取 消