Hello everyone:
Hope you’re having a good week.
I am in the process of building a package for some time series functions.
Ideally, I would like to have a setup that runs a CUDA Fortran program
(which requires an NVIDIA graphics card), and an Open MP version for no
NVIDIA. Is that possible, pleas
ols moves into
retirement. Off-list communication about such ideas welcome.
John Nash
On 14-07-08 06:00 AM, r-devel-requ...@r-project.org wrote:
> Message: 2
> Date: Mon, 7 Jul 2014 16:34:59 -0400
> From: Zhiyuan Dong
> To: r-devel@r-project.org
> Subject: [Rd] a question about optim.
> On Jul 7, 2014, at 4:34 PM, Zhiyuan Dong wrote:
>
> Hi, I am learning R by reading R source code. Here is one question I have
> about the optim function in R.
>
> The context : In the optim.R, after all the prep steps, the main function
> call call is made via :
>
> .External2(C_optim, par,
Hi,
On Mon, Jul 7, 2014 at 4:34 PM, Zhiyuan Dong wrote:
> Hi, I am learning R by reading R source code.
That's very brave of you.
You might also try reading some of the documentation and contributed
documentation, like:
http://adv-r.had.co.nz/C-interface.html
and
http://cran.r-project.org/doc/m
Hi, I am learning R by reading R source code. Here is one question I have
about the optim function in R.
The context : In the optim.R, after all the prep steps, the main function
call call is made via :
.External2(C_optim, par, fn1, gr1, method, con, lower, upper).
So, it seems to me, to follow
Hello Simon,
Thanks much for the replies. It makes sense now and I'm on the right
track. I'll explain why this
might happen.
I've written a package caller rterra [1] which essentially allows the
R user to write extensions in
Lua. The extensions are JIT compiled via LuaJIT. For deterministic
perfo
On Mar 6, 2014, at 5:32 PM, Saptarshi Guha wrote:
> Hello,
>
> This is a question that probably reveals my lack of understanding.
> In a C function (call it cfunc), i created a SEXP, called S, and then
> called R_PreserveObject on S.
>
> I returned the SEXP to the calling R function (call it r
Saptarshi,
a will be protected throughout the entirety of any r functions you call in
the loop. Do you have evidence that this is not the case? The protect stack
is last on first off, so assuming balance, even if UNPROTECT() is called
underneath the R functions you are calling, it won't touch a,
Hello,
However, I do need some sort of protection.
(pseudo code)
SEXP a = Rf_allocVector(STRSXP,)
protect a
for i = 1 to length of vector
SET_STRING_ELT(a,i, Rf_mkChar(...))
end
unprotect a
return a
I _need _that protect because in the for loop i also call some R functions
and need the obj
Saptarshi,
R_PreserveObject and R_ReleaseObject are, as far as I know, intended for
the rare situations where you need to maintain a SEXP in C that is not
pointed to by any R level symbols, and across e.g. .Calls.
If you are returning an object to R ("v" in this case) and intend to do
.Call("cfun
Hello,
This is a question that probably reveals my lack of understanding.
In a C function (call it cfunc), i created a SEXP, called S, and then
called R_PreserveObject on S.
I returned the SEXP to the calling R function (call it rfunc). Note, I
didn't call
R_ReleaseObject on S.
v <- .Call("cfun
i wonder why the following approach to make an 'object' executable could
not be made to work:
foo = 1:3
class(object) = c('foo', class(foo))
'(.foo' = function(foo, fun) sapply(foo, fun)
foo
# 1 2 3
foo(function(x) x^2)
# error: no function foo defined
the actual
1) 2.7.0 is rather old, and you were asked to update your R before
posting.
2) No file was attached. But how to handle encodings is in the 'R
Internals' manual. This is a tricky, advanced, topic in C-level R
programming. It is your responsibility, not ours, to get yourself up to
the level
Hi, Simon
Thanks for your elaborated instruction on mkCharCE.
Concerning the UTF-8 Encoding, mkCharCE(X, CE_UTF8) is the correct way in
parsing the Unicode string.
However, I met another question:
My program logic is intended to read the content of a text file r.tmp, which
is encoded wi
On Oct 28, 2008, at 6:26 , Fán Lóng wrote:
Hi guys,
Hey guy :)
I've got a question about the API mkchar(). I have met some
difficulty in parsing utf-8 string to mkchar() in R-2.7.0.
There is no mkchar() in R. Did you perhaps mean mkChar()?
I was intending to parse an utf-8 string s
Hi guys,
I've got a question about the API mkchar(). I have met some difficulty
in parsing utf-8 string to mkchar() in R-2.7.0.
I was intending to parse an utf-8 string str_jan (some Japanese
characters such asふ, whose utf-8 code is E381B5) to R API SEXP
mkChar(const char *name) , we only need
16 matches
Mail list logo