Displaying 20 results from an estimated 1100 matches similar to: "Calling function in DLL using .C"
2012 Jan 20
1
Calling Windows DLL using .C; function name not known but in exports.
First time ever that I try to call subroutines in a Win DLL using R.
Have done this before using VBA and Python.
The C code's function argument list contains only double pointers
(double *x). The function is declared void, the output value is one of
the arguments.
C calling sequence is used.
When inspecting the exports of the DLL with dumpbin I can see that the
function I need is
2008 Apr 09
1
getNativeSymbolInfo fails with Fortran symbol.
In the following code routine 'initaquaphy' is defined in Fortran,
and dynamically loaded into R.:
test.f:
subroutine initaquaphy(odeparms)
external odeparms
double precision pars(19)
common /myparms/pars
call odeparms(19, pars)
return
end
$ R CMD SHLIB Aquaphy.f
gfortran -fpic -g -O2 -c test.f -o test.o
gcc -std=gnu99 -shared
2011 Aug 17
3
getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux
Hi,
When loading a package that provides the user-supplied RNG hook
user_unif_rand, calling getNativeSymbolInfo("user_unif_rand") returns
informations about the loaded symbol.
I am using this to identify which package currently provides the RNG hook.
The results are the same on windows and linux if only one library
provides the hook.
If one loads a second package that provides this
2010 Jun 03
3
Interaction versus combinations
I can get the interactions between factors like this:
> idx=c(1,3,6,9)
> jdx=idx
> levels(interaction(idx,jdx,lex.order=TRUE))
[1] "1.1" "1.3" "1.6" "1.9" "3.1" "3.3" "3.6" "3.9" "6.1" "6.3" "6.6"
"6.9"
[13] "9.1" "9.3" "9.6"
2018 Nov 17
4
Impossible two bugs in Opus
Hello. Me again.
Have you tried to encode piano solo?
Noticed high bitrate Opus gave?
And there's also artefact at 15kHz
which wasn't in the original audio.
Visible with Spek program.
Download FLAC and Opus both files,
new link:
http://www.filedropper.com/example_3
FLAC full: 1084 kbps;
FLAC solo: 465 kbps.
with --bitrate 160:
Opus full: 158 kbps;
Opus solo: 190 kbps.
Included also Spek
2010 May 05
3
Memory issue
Reading a flat text file 138 Mbyte large into R with a combination of
scan (to get the header) and read.table. After conversion of text time
stamps to POSIXct and conversion of integer codes to factors I convert
everything into one data frame and release the old structures containing
the data by using rm().
Strangely, the rm() does not appear to reduce the used memory. I checked
using
2007 Mar 19
4
running VBA code/macros within Linux
Hi,
.
I know you can run Windows applications using WINE (winehq.com), but has
anyone tried, say, running Word or Excel VBA code/macros based on Windows
run time libraries?
.
the thing is that in their faq
(http://www.winehq.com/site/docs/wine-faq/index) they don't even mention
this possibility and searching on; VBA Word, doesn't give you any hits,
even though WINE does link to windows
2009 Aug 11
3
Lattice: How to do error bars
I am trying to add 2 stdev error bars to lattice type plots:
panel.ebar<-function(x,y,dy=NULL,...) {
panel.xyplot(x,y,...)
panel.segments(x,y-dy,x,y+dy,...)
}
Then:
xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar)
This adds error bars but they are not conditioned on the factor fc.
xyplot(y+I(y-dy)+I(y+dy)~x|fc,data=dat)
This produces 3 series of points in different colors, conditioned
2010 Sep 22
2
plot.ts versus plot.zoo
plot.ts has an argument yax.flip, plot.zoo does not.
Is there a way to make the yaxis flip in plot.zoo?
I tried using a custom panel function:
panel.yaxis<-function(...) {
npnl<-parent.frame$panel.number
if (npnl %% 2 == 0) {
axis(side=3)
} else {
axis(side=2)
}
}
This leads to a blank window. I am stuck with the intricacies of the
plotting and axis
2011 Feb 07
18
[PATCH] Btrfs-progs use safe string manipulation functions
Please find the attached patch which replace unsafe strcpy(3) by
strncpy(3) functions.
regards,
Eduardo Silva
2004 Sep 20
1
problem typcasting return of R_ExternalPtrAddr(SEXP s)
In the odesolve routine lsoda(), I allow the function (named func) that calculates the system of differential equations to be defined in a dll that has been dynamically loaded from the file named in dllname. I use getNativeSymbolInfo(func, dllname)$address to get the address of the function and pass it to a C function called via the .Call interface. Inside that C function, I use
2010 Apr 18
2
how to use Excel VBA's Shell() to call and execute R file
I have an R file R_test.R saved in C:\R_test folder. The R_test.R looks like
this:
setwd("C:/R_test")
rnorm(100)
write(rnorm(100),"data.txt")
q(save="no", runLast = F)
Next I would like use an Excel VBA/macro Shell() function to call R and
execute R_test.R file. The syntax is *Shell(pathname*[*,windowstyle*]*)*
I wrote an Excel macro RunRcode like this:
Sub
2007 Dec 15
2
Problems with the console functions?
Dear Wine-experts,
I've tested the functionality of simple CUI-applications with
wineconsole (Wine-0.9.50, Ubuntu 7.10). Somewhat surprisingly,
there seems to be numerous major flaws in the current
implementation.
The best (worst?) example is the widely distributed sample code
("Console: Demonstration of the Console Functions") available in
the MSDN library
2009 Apr 08
3
Convert data frame containing time stamps to time series
I read records using scan:
dat<-data.frame(scan(file="KDA.csv",what=list(t="%m/%d/%y
%H:%M",f=0,p=0,d=0,o=0,s=0,a=0,l=0,c=0),skip=2,sep=",",nmax=np,flush=TRUE,na.strings=c("I/OTimeout","ArcOff-line")))
which results in:
> dat[1:5,]
t f p d o s a l c
1 1/21/09 5:01 16151 8.2 76 30 282 1060 53 7
2 1/21/09 5:02
2001 Aug 15
2
WinAmp plug-in based on RC1?
Hi,
I just downloaded this and it says it's based on RC1 in the about box. Is
that a typo or is the plug-in not updated?
Olaf van der Spek
Almere, Holland
Olaf@XCC.TMFWeb.NL
http://xcc.tiberian.com/
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request@xiph.org'
2009 Jul 27
1
creating and populating an environment
Hi, I often work with R by writing long(ish) Excel-VBA macros
interspersed with calls to R via RExcel. A typical example of this would
be:
Sub VBAMacro()
'fetch some data from an excel sheet
'do some basic stuff on said data
'transfer data from vba to R
'run some R statements
'get data back to vba
'show results on the excel sheet
'clean R by deleting all vars
2013 Jul 12
2
Conexion excel vba con R y VBasic con R
Buenos días:
¿Hay alguna forma de conectar VBA de Excel con R, de forma que desde Excel
se puedan cursar instrucciones de R?, ¿ y V.Basic con R?
Gracias anticipadas.
Saludos
[[alternative HTML version deleted]]
2012 Apr 28
2
Equivalent of Nothing (in VBA) or [] in Matlab in R
Hi, I am very new to R so please excuse me if I am asking very obvious
questions.
I am trying to call a blackbox api function implemented in as a COM object
from R. The function definition says that
1. if calling from VBA, the first parameter should be set to "Nothing"
2. if calling from matlab, the first parameter should be set to []
What should be the equivalent for above in R?.
2011 Apr 01
4
Rexcel path problem
Hi,
I am running a test to call an R script with in excel using VBA. My VBA
code is shown bellow. The middle section of this mail also includes the
content of my Rscript. The bottom part shows the error message form the
R console.
It seems that Excel is opening the R console without any problems.
The problem I am seeing is that Rinterface.RRun instruction is
interpreting the "\T"
2008 Jan 11
2
communicate from Rterm
Please, help with announcing an error from Rterm:
I am calling R from an Excel VBA and noticed that if there is an error
nothing conspicuous happens. I would like just a popup window when R
cannot finish cleanly. The "ret " value returned from Shell is useless
in determining what happened.
Thank you all.
*****************************
Public Sub Repo()
ds = InputBox("Type in