Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Problems with embedding a *.data-file in R

$
0
0

Hey guys,

i got a problem while writing an R-procedure on my HANA-instance:

 

I want to store the content of a *.data-file in a variable (x)- all my tried failed.

here is what i already tried to do:

 

read the csv from my filesystem:

 

CREATE PROCEDURE MY_PROCEDURE(IN data TEST_DATA, IN params R_KM_PARAMS, OUT results R_KM_RESULTS)

LANGUAGE RLANG AS

BEGIN

 

library(rpart)

library(randomForest)

library(tree)

 

setwd("C:/Users/Christiane/Desktop/HANA workspace/HANA_Applications/")

x <- read.csv("covtype.csv", header=false);

 

x$V5 = as.factor(x$V5);

 

....

END;

 

creates the following failure:

Could not execute 'CALL MY_PROCEDURE (TEST_DATA, R_KM_PARAMS, R_KM_RESULTS) WITH OVERVIEW' in 819 ms 239 µs . SAP DBTech JDBC: [2048]: column store error: search table error:  [34082] Execution of R script failed.;Error in setwd("C:/Users/../../HANA workspace/HANA_Applications/") :

  cannot change working directory

stack trace:

1: setwd("C:/Users/../Desktop/HANA workspace/HANA_Applications/")

 

----------------

NOTE: i put in the "..." in the path name because i thought you don't need to know my personal filenames

 

 

So how do i embedd csv's into hana with RLANG?

 

Thanks a lot by now,

CHristiane


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>