Hi ,
When a R session runs , it creates a temporary directory . I am using
R_CleanTempDir() to clean it up . It looks like its not working properly .
So what exactly is going on here is , my example is
main()
start__R__Interpreter
while(1)
{
execute R scripts using R_parseVector
.
Thanks,
On Thu, Jun 26, 2014 at 6:35 PM, Hervé Pagès wrote:
> 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
) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
UNPROTECT(7);
return res;
}
On Thu, Jun 26, 2014 at 4:52 PM, Hervé Pagès wrote:
> Hi Sandip,
>
>
> On 06/26/2014 04:21 PM, Sandip Nandi wrote:
>
>> Hi ,
>>
>> I have put incomplete code here . The complet
,valueVector[1]);
setAttrib(df,R_RowNamesSymbol,lsnm);
PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
UNPROTECT(7);
return res;
}
On Thu, Jun 26, 2014 at 3:
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;
//
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
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")) ;
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)
>
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(CD
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 = PROTECT(eval(dfm,R_GlobalEnv));
PROTECT(head=lang3(install("head"),res,
Hi ,
I tried to do the following . Before I execute the R script , i tried to
clear the work space using
rm(list = ls(all = TRUE)); . I get the following back trace . Its a huge
backtrace , attached a part of it . Can anyone help why I get this ?
#13 0x2afd612f in Rf_eval (e=0x1448d68, r
Hi ,
I am asking too many questions , sorry for that . I am creating a data
frame in C itself , reading a table .
The data frame calling code looks like this
==
*PROTECT(dfm=lang2(install("data.frame"),df));*
*SEXP res = PROTECT(eval(dfm,R_GlobalEnv));*
UNPR
;integer"
>
>
> df[[2]]
[1] abc def xyz
Levels: abc def xyz
Thanks
On Tue, Apr 1, 2014 at 6:18 PM, Joshua Ulrich wrote:
>
> On Apr 1, 2014 8:04 PM, "Sandip Nandi" wrote:
> >
> > Hi ,
> >
> > I am concerned about the return value of typeof in cha
Hi ,
I am concerned about the return value of typeof in character column in a
dataframe. I expect it to be of character ,it returns integer instead .
Thanks
On Tue, Apr 1, 2014 at 5:56 PM, Joshua Ulrich wrote:
>
> On Apr 1, 2014 7:48 PM, "Sandip Nandi" wrote:
> >
>
ps because indexes start at 0?
>
> Sent from my iPhone
>
> > On Apr 1, 2014, at 5:46 PM, Sandip Nandi wrote:
> >
> > Hi ,
> >
> > I want to know is this behavior expected and why is that ? Need some help
> >
> > gender <- c("F",
Hi ,
I want to know is this behavior expected and why is that ? Need some help
gender <- c("F", "M", "M", "F", "F", "M", "F", "F")
> age<- c(23, 25, 27, 29, 31, 33, 35, 37)
> df<- data.frame(gender,age)
> typeof(df[[1]])
[1] "integer" > Why is this integer . *Should not it be
e would be:
>>
>>int num_rows = Rf_length(VECTOR_ELT(dataframe, 0));
>>int num_columns = Rf_length(dataframe);
>>
>> There may be edge cases for which this doesn't work; would need to
>> look into how the dim primitive is implemented to be sure.
>>
&
);
>
> There may be edge cases for which this doesn't work; would need to
> look into how the dim primitive is implemented to be sure.
>
>- Murray
>
>
> On Mon, Mar 31, 2014 at 4:40 PM, Sandip Nandi
> wrote:
> > Hi ,
> >
> >
Hi ,
Is there any C API to the R API nrow of dataframe ?
x<- data.frame()
n<- nrow(x)
print(n)
0
Example :
My C function which deals with data frame looks like and I don't to send
the number of rows of data frame .I want to detect it from the function
itself, my function take data frame as ar
Hi Bill ,
The following C code may help you , time_t is typedef to long int
SEXP getTime() {
time_t current_time;
char* c_time_string;
current_time = time(NULL);
c_time_string = ctime(¤t_time);
return mkString(c_time_String); // or if you want to return as int
vector return s
Hi ,
I am trying to create a dataframe in C and sebd it back to R. Can anyone
point me to the part of the source code where it is doing , let me explain
the problem I am having .
My simple implementation is like this
SEXP for
>
>
> On Tue, Feb 25, 2014 at 12:00 PM, Sandip Nandi wrote:
>
>> Hi ,
>>
>> I am running R from C using the interpreter . Now i
>> execute detach("package:td", unload=TRUE)
>> And I get the following error . Any idea what it means ?
>
Hi ,
I am running R from C using the interpreter . Now i
execute detach("package:td", unload=TRUE)
And I get the following error . Any idea what it means ?
*** caught segfault ***
address 0x102, cause 'memory not mapped'
Traceback:
1: sys.parent()
2: sys.function(sys.parent())
3: formals(s
e 0022 which is more commonly used (please see unix documentation on the
> concepts involved).
>
> Cheers,
> Simon
>
>
> On Feb 7, 2014, at 1:15 PM, Sandip Nandi wrote:
>
> > Hi ,
> >
> > I have installed R on my system and the user access control looks like
&
Hi ,
I have installed R on my system and the user access control looks like this
-rwxr-x*---* 1 root root 10578117 Feb 3 11:26 libR.so
I have installed R as root , but the access control for other is not
enabled by default ( at least Read option) .
This can be solved using linux ways, but I am
Hi ,
Fortran 4.3 which comes with SDK for suse 11 needs to compiled with a -0
instead of the default -O2 option . Can you try that.
Thanks
Sandip
On Fri, Jan 24, 2014 at 12:24 AM, Prof Brian Ripley
wrote:
> On 24/01/2014 07:21, claus.neuma...@merckgroup.com wrote:
>
>> Dear all,
>>
>> I have
Thank you Prof Brian , Duncan .
Let me try that out,
Thanks,
Sandip
On Tue, Jan 21, 2014 at 9:14 PM, Prof Brian Ripley wrote:
> On 22/01/2014 00:08, Duncan Murdoch wrote:
>
>> On 14-01-21 5:41 PM, Sandip Nandi wrote:
>>
>>> Hi ,
>>>
>>> I am using C
Hi ,
I am using C interface of R . If a unicode string is read , in what format
I could pass it back to R ?
I was trying to use the following
tpStr = ( char *)val;
SET_STRING_ELT(innerList , 0, mkChar(tpStr));
It does not work .
If I pass it back from as RAW format to R , what package is the
Hi ,
The video may help you
http://vimeo.com/11937905
Thanks,
Sandip
On Thu, Jan 16, 2014 at 4:17 PM, Ma, Saisai - maysy020 <
saisai...@mymail.unisa.edu.au> wrote:
> Hi all,
>
> Sorry to bother you.
>
> I am a beginner in R programming. I have encountered some problems when I
> modified a R p
Hi R-Developers ,
I am using R-3.1 , moved from R-2.15 . I am facing a problem which I have
raised in R bug report with bug 15596 .
My problem is how to check if R is initiated before initiating R
I am embedding R in parallel environment and reusing process already
running to reduce overhead . E
30 matches
Mail list logo