speed up unoconv conversion process - unix

I am converting xlsx file to csv using unoconv in unix. I find it very slow if file is above 20mb. It takes more than 10mins to convert. Is there a way to speed it up.
command I use is this.
unoconv -f csv testfile.xlsx

Dag Wieers, the unoconv developer does answer this question saying that using latest LibreOffice is usually a good idea. Please have a look at this thread
https://github.com/dagwieers/unoconv/issues/187

Related

Can I restore unsaved RMD file?

I used Rstudio and IOS systems.
I moved my RMD file from the desktop to a folder to prepare for submission without saving it before changing the places of RMD, which means it wasn’t the last version. I used R for most of my data cleaning process and indeed spent a lot of time on it. Is there any specific way to restore it?
Thanks very much for any potential help.
I tried restart the R. Check the recent files but nothing found

Scheduling R Script - OSX

I have written a series of R Scripts that create csv files. From there, Tableau will read the csv's and update various dashboards. As Tableau can easily be scheduled to update on a daily cadence, I was hoping to do the same with my R Script.
While there are a bunch of answers already with solutions for Windows, there hasn't been a solution posted for OSX. I have looked into trying to run my script in Terminal and use automator to do it, but couldn't quite figure it out. Basically, when the shell script runs it terminates midway through because there are errors in the R Script - but I do not care about the errors. The Automator didn't work as well.
Additionally, I also looked into Data Integration/Pentaho but the additional software configuration and subsequent installation seemed difficult.
Any help or insight would be greatly appreciated! Thanks!
Type crontab -e and add this line to the resulting file
#daily Rscript 1.R && Rscript 2.R
It will run the files 1.R, followed by 2.R at midnight every day. Hope that helps.
The most flexible way to do this is to use launchd, the service that manages processes on OS X. You can look at some examples in the official documentation.

Execute a .bat file within the R console

Is it possible to Execute a .bat file within the R console? I know I can run R in batch mode, but am wondering if I can start a .bat file from the R code within itself. I have googled it and cannot seem to find an answer. Thanks in advance!
I guess you could use system command for invoking OS commands. Please check here for more info.

writing hex files for linux (without a compiler/interpreter)

I would like to learn how to write(by this I mean, handcraft a program(as opposed to using a compiler), not how to edit a hex/binary file) binary files for debian.
I've tried googling, but that hasn't been very helpful. Could someone point me in the direction of the proper reading materials. I would like to learn how to write headers and such. I'm hoping to write something for a unix-y OS (right now, my setup has debian running on a MIPS32 architecture, but learning stuff to execute on bare metal would be ok for now too.)
Try hexdump for reading and hexedit for writing.
One should probably read this then.
http://www.skyfree.org/linux/references/ELF_Format.pdf

Call R scripts in Matlab

Is it possible to call R scripts in a MATLAB program? How can I do that?
You can use R in batch mode. If R is in your path, then you can call from MATLAB:
system('R CMD BATCH infile outfile');
will run the code in infile and place output in the outfile.
EDIT:
You can also give it a try with another approach using a R package rscproxy and R(D)COM Server, described here.
After using R(D)COM and Matlab R-link for a while, I do not recommend it. The COM interface has trouble parsing many commands and it is difficult to debug the code. I recommend using a system command from Matlab as described in the
R Wiki.
system is almost definitely the way to go, as described in other answers. For completeness, you could also use MATLAB's capability to run Java code, and JRI or RCaller to call R from Java. Similarly, you can use MATLAB's capability for running .NET code and R.NET.
Yes. On Windows, I have done a lot of this via the Matlab R-link and then R(D)COM server on the R side.
It works beautifully for passing commands and data back and forth. Calling R via the OS is feasible, but then you have to deparse (write) and parse (load) data passed between them. This is tedious and no fun. Especially if you are much data around. It also means that you lose state on the R side and every invocation is just like the first time.
On Linux or another OS, or even for more general usage, I'd now try Rstudio as a server -- see http://www.rstudio.org/docs/server/getting_started for more info.
Another way RWiki recommended:
CurrentDirectory=strrep(pwd,'\','/');
eval(['!C:\R\R-3.0.1\bin/Rscript "' CurrentDirectory '/Commands.R"'])
You can run command line functions in matlab using the unix command. The easiest way would probably be to set up an R script which outputs results to a text file, run the script in matlab using the unix command, and then (in matlab) verify that the file exists and load it up.
You could use the system command to execute R scripts. Something like the following:
[status] = system('R CMD BATCH [options] script.R [outfile]')
where [options] are the options your send to the R interpreter, and [outfile] is your output file.

Resources