python code:
import rpy2.robjects as robjects
rCommand='''gender <- c("๋จ์", "๋จ์", "๋จ์", "์ฌ์", "์ฌ์", "์ฌ์", "์ฌ์", "์ฌ์")
age <- c(23, 25, 27, 29, 31, 33, 35, 37)
outdf <- data.frame(gender, age)
'''
robjects.r(rCommand)
resultDf_r=robjects.globalenv["outdf"]
print type(resultDf_r)
Korean characters kill python.exe.
In the R command terminal, "rCommand" above works well.
I could not find a solution.
Any help would be appreciated.
my env: window 7 x64, python 2.7.8 x64, rpy2 2.5.4, R 3.1.2
source
share