Skip to main content
1-Visitor
March 19, 2015
Solved

MathCad on R

  • March 19, 2015
  • 6 replies
  • 3679 views

Hi,

I am using R to analyze some thermal conductivity data, and I also have some related functions in MathCad 15. Does anyone know of a way to access or import MathCad into R?

I know it is possible to do it with MatLab: there is a package written in R for it.

I believe that many R users use C++ to write the functions that I have in MathCad: and it's easy to import C++ into R. But I don't know C++.

I have a lot of code in R, and it does what I need in general, so I want to use it as my main package for this application. I'm just hoping to find a way to re-use what i've done in MathCad.

I asked the same question on StackExchange and so far nobody has come back and said it's possible.

I suspect that it's not possible, and that i will have to re-type/formulate my MathCad code into C++ for use in R.

Thanks,

Alan

Best answer by RichardJ

By worksheet, I mean a Mathcad worksheet. You can pass values from R to a Mathcad worksheet via the automation interface, have Mathcad do it's calculations, and then get the results via the automation interface. At least, I assume you can. I'm not familiar with R, but it's hard to imagine it does not have a way to call other software.

6 replies

19-Tanzanite
March 19, 2015

You can call Mathcad via the automation interface. That allows you to pass values to a worksheet, and get calculated values form a worksheet.

ajarvis-21-VisitorAuthor
1-Visitor
March 19, 2015

Sorry, but I don't understand. When you say "worksheet" do you mean an Excel worksheet? I'm not using Excel, but R. Was that understood?

I need to be able to use the given functions (now written in MathCad) inside R.

Pass data to and from them to databases.

I know one can do this for MATLAB, see for example:

http://cran.r-project.org/web/packages/R.matlab/index.html

http://mathesaurus.sourceforge.net/octave-r.html

But I don't see anything for MathCad.

I wondered if maybe I just didn't know either language well enough, but I'm becoming pretty sure that it's not possible.

If so, I guess I just need to learn enough C++ (or MatLab) to be able to do what I need.

RichardJ19-TanzaniteAnswer
19-Tanzanite
March 19, 2015

By worksheet, I mean a Mathcad worksheet. You can pass values from R to a Mathcad worksheet via the automation interface, have Mathcad do it's calculations, and then get the results via the automation interface. At least, I assume you can. I'm not familiar with R, but it's hard to imagine it does not have a way to call other software.