You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below code is not working due to write df in csv file.
stuck in write csv file.
so what need to do for that ?
Saperate R code is working but not working with your library.
`<?php
require 'vendor/autoload.php';
use Okvpn\R\Process\RProcess;
use Okvpn\R\UnixPipes;
$rPath = '/usr/bin/R'; //path to R
//$rPath = 'C:\Program Files\R\R-3.5.1\bin\R.exe';
$process = new RProcess(new UnixPipes(), $rPath);
Below code is not working due to write df in csv file.
stuck in write csv file.
so what need to do for that ?
Saperate R code is working but not working with your library.
`<?php
require 'vendor/autoload.php';
use Okvpn\R\Process\RProcess;
use Okvpn\R\UnixPipes;
$rPath = '/usr/bin/R'; //path to R
//$rPath = 'C:\Program Files\R\R-3.5.1\bin\R.exe';
$process = new RProcess(new UnixPipes(), $rPath);
$process->start();
$rOutput = $process->write(<<<TXT
setwd("/root")
library(ggplot2)
library(RJSONIO)
library(rPython)
library(ggsunburst)
df <- read.table(header = T, sep = ",", text = "
parent,node,size
/,home,
home,Images,40
home,Videos,20
home,Documents,5
/,usr,
usr,src,
src,linux-headers,4
src,virtualbox,1
usr,lib,4
usr,share,2
usr,bin,1
usr,local,1
usr,include,1
")
write.table(df, '/root/df.csv', sep = ",", row.names = F)
sb <- sunburst_data('/root/df.csv', sep = ",", type = "node_parent")
png('test1.png')
sunburst(sb, node_labels = T, rects.fill.aes = "name")
dev.off()
TXT
);
?>
`
Thanks
The text was updated successfully, but these errors were encountered: