R语言资料

  1. 李东风教程
    参考:https://www.math.pku.edu.cn/teachers/lidf/docs/Rbook/html/_Rbook/index.html

  2. 安装ROracle
    参考:https://www.oracle.com/tw/database/technologies/appdev/roracle.html

install.packages('ROracle', configure.args='--with-oci-lib=/Users/**/Downloads/instantclient_23_3')
# 其中/Users/**/Downloads/instantclient_23_3 为Oracle Instant Client 安装路径,包括 basic,sdk
  1. 设置ROracle支持中文
    参考:https://blog.csdn.net/weixin_43649997/article/details/105010050
# 在R Script的开始位置设置:
# Set the NLS_LANG environment variable to use UTF-8 encoding
Sys.setenv(NLS_LANG = "AMERICAN_AMERICA.UTF8")

# Ensure your R session is using UTF-8
options(encoding = "UTF-8")

# conncet to database
connect.string <- glue("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={address})(PORT={port}))(CONNECT_DATA=(SERVICE_NAME={service})))")

posted on 2024-10-08 23:02  朝朝暮Mu  阅读(6)  评论(0编辑  收藏  举报