On Jun 25, 2014, at 11:31 PM, Sandip Nandi wrote:
> Hi ,
>
> I am trying to call head function from C . My doubt is with the parameter
> n,how to pass it .
>
> PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
> SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
> SEXP res = PRO
Dear r-developers,
I currently face an issue while compiling R from source on a debian wheezy.
When running the configure script (particularly with --enable-R-shlib
--prefix=/packages/R/3.1.0/) I get a Makefile and the output
...
Interfaces supported: X11
External libraries:read
On 26/06/2014 07:46, Preussner, Jens wrote:
Dear r-developers,
I currently face an issue while compiling R from source on a debian wheezy.
When running the configure script (particularly with --enable-R-shlib
--prefix=/packages/R/3.1.0/) I get a Makefile and the output
...
Interfaces suppor
Hi ,
I am trying to implement the following from C
> x
a b
1 1 2
2 3 4
r<- head(x,n=1)
> r
a b
1 1 2
I tried my code , its not working , its not working for the value of the
parameter n
Thanks,
Sandip
On Thu, Jun 26, 2014 at 12:50 AM, Simon Urbanek wrote:
> On Jun 25, 2014, at 11:31
Hi ,
Sorry . I am very sorry . Such a mistake . Sorry for the email .
Thanks,
Sandip
On Thu, Jun 26, 2014 at 9:10 AM, Sandip Nandi wrote:
> Hi ,
>
> I am trying to implement the following from C
>
> > x
> a b
> 1 1 2
> 2 3 4
>
> r<- head(x,n=1)
> > r
> a b
> 1 1 2
>
> I tried my code ,
>> PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
>> SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
>> SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
>> PROTECT(head=lang3(install("head"),res,ScalarInteger(1)));
>> head = PROTECT(eval(head,R_GlobalEnv));
>>
>>
>> I tried the a
Thank you for the wonderful suggestion . do you suggest to protect
ScalarInteger(1)
before calling lang3 ?
Thanks
On Thu, Jun 26, 2014 at 1:36 PM, Radford Neal
wrote:
> >> PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
> >> SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
> Thank you for the wonderful suggestion . do you suggest to protect
> ScalarInteger(1)
> before calling lang3 ?
Yes, either the result of Scalar Integer(1) or the result of install
should be protected (before calling lang3 - don't try to do it inside
the argument list of lang3).
___
Thank you very much . I forgot one thing in my code
SET_TAG(CDDR(head), install("n")) ; after that it works
Thanks again,
Sandip
On Thu, Jun 26, 2014 at 2:25 PM, Radford Neal
wrote:
> > Thank you for the wonderful suggestion . do you suggest to protect
> > ScalarInteger(1)
> > before calling
Hi ,
For our production package i need to create a dataframein C . So I wrote
the following code
SEXP dfm ,head,df , dfint , dfStr,lsnm;
*SEXP valueVector[2];*
char *ab[3] = {"aa","vv","gy"};
int sn[3] ={99,89,12};
char *listnames[2] = {"int","string"};
int i,j;
//
Hi,
On 06/26/2014 01:36 PM, Radford Neal wrote:
PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
PROTECT(head=lang3(install("head"),res,ScalarInteger(1)));
head = PROTECT(eval(head,R_G
On 26 June 2014 at 12:10, Prof Brian Ripley wrote:
| On 26/06/2014 07:46, Preussner, Jens wrote:
| > Dear r-developers,
| >
| > I currently face an issue while compiling R from source on a debian wheezy.
When running the configure script (particularly with --enable-R-shlib
--prefix=/packages/R/3
Hi,
On 06/26/2014 02:32 PM, Sandip Nandi wrote:
Hi ,
For our production package i need to create a dataframein C . So I wrote
the following code
SEXP dfm ,head,df , dfint , dfStr,lsnm;
*SEXP valueVector[2];*
char *ab[3] = {"aa","vv","gy"};
int sn[3] ={99,89,12};
char *listnames[2] = {"int",
Hi ,
I have put incomplete code here . The complete code works , My doubt is ,
what I am doing logical/safe ? Any memory leak going to happen ? is there
any way to create dataframe ?
SEXP formDF() {
SEXP dfm ,head,df , dfint , dfStr,lsnm;
SEXP valueVector[2];
char *ab[3] = {"aa","vv","gy"};
i
Hi Sandip,
On 06/26/2014 04:21 PM, Sandip Nandi wrote:
Hi ,
I have put incomplete code here . The complete code works , My doubt is
, what I am doing logical/safe ? Any memory leak going to happen ? is
there any way to create dataframe ?
I still don't believe it "works". It doesn't even compi
Hi ,
I have asked a question , whether the data structure I am using to create a
dataframe is fine or there is anyother way i can use. My aim is to read a
database and write it to dataframe and do operation on it . The dataframe
creation ,output everything works . The code I put is wrong , tryin
On 06/21/2014 12:56 AM, Prof Brian Ripley wrote:
On 20/06/2014 15:37, Ista Zahn wrote:
Hello,
I've noticed that dget() is much slower in the current and devel R
versions than in previous versions. In 2.15 reading a 1-row
data.frame takes less than half a second:
(which.r <- R.Version()$
On 06/26/2014 05:18 PM, Sandip Nandi wrote:
Hi ,
I have asked a question , whether the data structure I am using to
create a dataframe is fine or there is anyother way i can use. My aim is
to read a database and write it to dataframe and do operation on it .
The dataframe creation ,output every
Hello,
The Writing R Extensions manual gives confusing advice. Compare
Packages listed in imports or importFrom directives in the NAMESPACE file
should almost always be in ‘Imports’ and not ‘Depends’.
with
Almost always packages mentioned in ‘Depends’ should also be imported from in
the NA
19 matches
Mail list logo