たとえば、stringsAsFactors
のオプションをsqlQueryに使用します。ドキュメントは例えばhereです。ヘルプページから基本的な例を変更
:...
を経由して、引数を通過
channel <- odbcConnect("test")
sqlSave(channel, USArrests, rownames = "State", verbose = TRUE)
options(dec=".") # optional, if DBMS is not locale-aware or set to ASCII
## note case of State, Murder, Rape are DBMS-dependent,
## and some drivers need column and table names double-quoted.
sqlQuery(channel, paste("select State, Murder from USArrests",
"where Rape > 30 order by Murder"),
stringsAsFactors=FALSE) ## your option here
close(channel)
sqlFetch()
として、それは同じように動作します。 stringsAsFactors=FALSE
を追加するか、options()
で全体を設定してください。
いくつかのコード例を含めてください:テーブルの読み込みに使用された関数を見てください。 – neilfws