04
2019
03

JMP and R Communication

General Summary

There's many statistical analysis software, jmp and R are two of them.

R input JMP file


Also, there's many ways to import data from other format to R, but there's no directly way to import jmp data into R.

library(RDCOMClient)

jmp <- COMCreate("JMP.Application")

doc = jmp$OpenDocument("C:/Demo.jmp")

doc$SaveAs("d:/Demo.csv")

td<-read.csv("d:/Demo.csv")

head(td)

file.remove("d:/Demo.csv")

JMP call R


JMP can also call R and return the calculated result or graphics to JMP.

dt = open("C:/Demo.jmp");

R init();

R Send(dt);

Close(dt);

R Submit("head(dt)");

R Submit("

library(ggplot2)

ggplot(dt,aes(x=time.point..month.,y=potency.A......,group=batch))+geompoint()+geomsmooth(method=lm)

");

plot = R Get Graphics("png");

New Window("plot",Picture Box(plot));

R Term();

« 上一篇

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。