On Sat, 19 Jun 2010, David Scott wrote:
I have no experience with incorporating Fortran code and am probably doing
something pretty stupid.
Surely you saw in the posting guide that R-help is not the place for
questions about C, C++, Fortran code? Diverting to R-devel.
I want to use the
On 17.06.2010 09:19, Thaler,Thorn,LAUSANNE,Applied Mathematics wrote:
Indeed, the R version is 2.9.2. But the package was built on the very
same system. Besides, another package built with the same version of R
but on another machine does not show this nasty behavior. Upgrading,
however, could
Greetings,
I am trying to call simple C-code from R.
I am on Windows XP with RTools installed.
The C-function is
#include R.h
#include Rinternals.h
#include Rmath.h
#include Rdefines.h
// prevent name mangling
extern C {
SEXP __cdecl test(SEXP s){
SEXP result;
PROTECT(result =
Hello,
Is this expected ?
nchar( c( , NA ) )
[1] 0 2
Should not the second one be NA ?
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/98Uf7u : Rcpp 0.8.1
|- http://bit.ly/c6YnCi : graph gallery collage
`-
Hi Romain,
Did you read the help for nchar?
Value:
For ‘nchar’, an integer vector giving the sizes of each element,
currently always ‘2’ for missing values (for ‘NA’).
It may be unexpected behavior, but it's *well-documented* unexpected behavior.
Sarah
On Fri, Jun 18, 2010 at 4:52
The help page says:
For nchar, an integer vector giving the sizes of each
element, currently always 2 for missing values (for
NA).
On Fri, Jun 18, 2010 at 5:52 PM, Romain Francois
rom...@r-enthusiasts.comwrote:
Hello,
Is this expected ?
nchar( c( , NA ) )
[1] 0 2
Le 18/06/10 22:58, Sarah Goslee a écrit :
Hi Romain,
Did you read the help for nchar?
Value:
For ‘nchar’, an integer vector giving the sizes of each element,
currently always ‘2’ for missing values (for ‘NA’).
It may be unexpected behavior, but it's *well-documented* unexpected
On Jun 18, 2010, at 10:23 AM, michael meyer mjhme...@googlemail.com wrote:
Greetings,
I am trying to call simple C-code from R.
I am on Windows XP with RTools installed.
The C-function is
#include R.h
#include Rinternals.h
#include Rmath.h
#include Rdefines.h
// prevent name
Value:
For ‘nchar’, an integer vector giving the sizes of each element,
currently always ‘2’ for missing values (for ‘NA’).
It may be unexpected behavior, but it's *well-documented* unexpected behavior.
Oh, that must make it ok then.
For a more sensible take:
library(stringr)
Michael,
You are getting confused in compiler minutia when you could be concentrating
on your code. The inline package can help here.
Consider the snippet below which loads inline, defines your function body
sans headers etc and then uses the magic of inline to compile, link and load
your
10 matches
Mail list logo