[英]Printing multi-line R output from PHP
I am using venn()
of gplots
package of R and I want to print the intersections on php. 我正在使用R的
gplots
包的gplots
venn()
,并且我想在php上打印交集。 I am executing R using exec()
and printing the output, it only prints last lines of a. 我正在使用
exec()
执行R并打印输出,它仅打印a的最后几行。
library(gplots)
f <- list(a, b, c, d, e)
info<-venn(f)
aa<-attr(info, "intersections")
print(aa)
Take individual intersections and merge them in a single variable. 取单个交点并将其合并为单个变量。 You can try like this.
您可以这样尝试。
library(gplots)
f <- list(a, b, c, d, e)
info<-venn(f)
a<-attr(info, "intersections")$`A:B:C:D`
aa<-attr(info, "intersections")$`A:B:C:E`
aaa<-attr(info, "intersections")$`A:B:C:D:E`
a<-toString(paste(a,collapse=","))
aa<-toString(paste(aa,collapse=","))
aaa<-toString(paste(aaa,collapse=","))
x<-paste(a,aa,aaa,sep = "|")
print(x)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.