Group Abstract Group Abstract

Message Boards Message Boards

Send a csv data file from Mathematica to R via RLink?

Posted 9 years ago

Dear colleagues. I am using RLink for my first time and I am struggling to send a csv data file from Mathematica to R. Having "data" , a csv file in Mathematica, using

RSet["npldata", data] 

in attempt of sending "data" to a dataset "npldata" in R, I receive the following error message:

RSet::badval: The expression {{row_names,client_idNumber,ApplicationForm_RecordID,EmpiricaScore,Timestamp,BureauRecordID,
AffordabilityRule1,<<38>>,revolving_calc_CurrentMonthsOD_non_nlr,revolving_NumberOfAccounts,revolving_delinquency_new_accounts,
revolving_YearsSinceAccountOpened,instalment_total_commit_nlr,<<10>>},{1,<<49>>,<<10>>},<<47>>,{<<1>>},<<6938>>} is not convertable to R

Please advise. Many thanks in advance,

POSTED BY: Farai Mlambo

It is not clear what data you are importing to R. Generally it is nice to test the compatibility of your data using ToRForm function.

From RSet documentation:
"The expression expr must be of the type convertible to R. Normally, you can use the ToRForm function to obtain an internal RLink representation for Wolfram Language expressions you want to send to R, and at the same time test whether or not your expression is legal."

POSTED BY: Damanjit Singh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard