Displaying 11 results from an estimated 11 matches for "sannandi".
2014 Apr 02
3
Typeof for character vector in dataframe returns integer
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"
2014 Feb 07
1
How to set user read request while R install
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 interested to know if there
is any way to mention while we run R or install R packages.
What I am
2014 Feb 25
1
What this error 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(sys.function(sys.parent()))
4: match.arg(event)
5: packageEvent(pkgname,
2014 Mar 31
1
C API to get numrow of data frame
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 argument and do some on it. I want
API equivalent to nrow. I tried Rf_nrows,Rf_ncols . No
2014 Jun 25
1
Need help on calling Head from C
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,ScalarInteger(1)));
head = PROTECT(eval(head,R_GlobalEnv));
I tried
2014 Apr 03
1
question regarding lang2 command in C
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));*
UNPROTECT(2);
return res;
==================================
It works fine , now the problem
2013 Dec 20
1
Fwd: How to check if R interpreter is initiated
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 . Each process is running infinitely. So when a
process is reused,it finds R is already initialized
2014 Jan 21
1
Using unicode from C interface of R
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 there to read
it ? I mean package for interpreting RAW data .
Thanks,
Sandip
[[alternative HTML
2014 Jun 26
1
using 2D array of SEXP for creating dataframe
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;
//=============================
PROTECT(df = allocVector(VECSXP,2));
2014 May 02
1
backtrace while trying to clear workspace
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 0x00002aaaaafd612f in Rf_eval (e=0x1448d68, rho=0x16c6780) at eval.c:399
#14 0x00002aaaaafdabf6 in Rf_applyClosure (call=0x1447108, op=0x1448f60,
2014 Mar 06
1
Create dataframe in C from table and return to R
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 formDF() {
SEXP dfm ,df , dfint , dfStr,lsnm;
char *ab[3] =