Transmit trades between Excel and R - r

Is there a way to make calls between R and Excel in order to run R quantstrat package using EOD data. Send proposed trades to an excel file (which has to be inserted manually as the broker does not have an API) and then import the trades from an excel file to R for continuous analysis? Thanks for your help

Related

Read a sub-set of NetCDF file in R

Is there a possibility to read a subset of a NetCDF file in R?
In Matlab, I can use
ncread(filename,'WS',[i_timeseries,j_timeseries,1,1],[1,1,1,48])
I am trying to extract a time series from the New European Wind Atlas using free software (preferably R) on Windows.
Many thanks indeed.

Read data from website into R

I am trying to read in data from a data visualization website (Qlik). Table access requires my username and pw. It also requires me to select a date range for the data. Is there a way I can read this kind of data into R instead of having to download the data each time into excel files and then reading them into R?
Thanks!

Is it possible to use R as a "standalone" invisible computational backend in Excel?

I know it is possible to integrate R with Excel using packages such as RExcel,but is it possible to use R as a "standalone" invisible computational backend in Excel? For example, my objective is to create statistical programs that use Excel as a front end and leverage R packages in the back end for statistical computations. I would like users to be able to use the Excel workbooks without having to install R.

Can tableau extract be loaded into R

I have a tableau extract.
I want to analyze the data in that tableau extract using R.
Does any one know how to load tableau extract into R?
A tableau data extract (.tde file) is a native tableau format. As far as I know you cannot read it directly without using tableau. So, you need to open it in tableau and then export the data if you want to take it out of tableau.
If you want all the data you can do something like this:
From here you can then paste into excel and save it as a .csv file which R can hit.
However, if you are happy to have the data in a .tde format you can always create R calculations in tableau. This is done by using rserver to communicated between R and tableau. See: https://www.tableau.com/sites/default/files/media/whitepaper-power-tableau-and-r.pdf

clear memory in SPSS, like what is done in R

Being an R user, I'm now trying to learn the SPSS syntax.
I sed to add the command rm(list=ls()) at the being of R script to ensure that R is empty before I go on my work.
Is there a similar command for SPSS? Thanks.
Close to the functional equivalent in SPSS would be
dataset close all.
This simply closes all open dataframes except for the active dataframe (and strips it of its name). If you open another dataset the previous dataframe will close automatically.
Since the way SPSS uses memory is fundamentally different from how R uses it, there really isn't a close equivalent between rm and SPSS memory management mechanisms. SPSS does not keep datasets in memory in most cases - which is why it can process files of unlimited size. When you close an SPSS dataset, all its associated metadata - which is in memory, is removed.
DATASET CLOSE ALL
closes all open datasets, but there can still be an unnamed dataset remaining. To really remove everything, you would write
dataset close all.
new file.
because a dataset cannot remain open if another one is opened unless it has a dataset name.
You might also be interested to know that you can run R code from within SPSS via
BEGIN PROGRAM R.
END PROGRAM.
SPSS provides apis for reading the active SPSS data, creating SPSS pivot tables, creating new SPSS datasets etc. You can even use the SPSS Custom Dialog Builder to create a dialog box interface for your R program. In addition, there is a mechanism for building SPSS extension commands that are actually implemented in R or Python. All this apparatus is free once you have the basic SPSS Statistics. So it is easy to use SPSS to provide a nice user interface and nice output for an R program.
You can download the R Essentials and a good number of R extensions for SPSS from the SPSS Community website at www.ibm.com/developerworks/spssdevcentral. All free, but registration is required.
p.s. rm(ls()) is useful in some situations - it is often used with R code within SPSS, because the state of the R workspace is retained between R programs within the same SPSS session.
Regards,
Jon Peck

Resources