[R] Return dynamic array from C to R

2012-04-21 Thread Jaimin Dave
Hi Everyone, I am new to R and I am trying to return array(dynamic) from C to R. But when I print array(vector) in R it gives NA as output. When I print array in C it gives correct o/p but some how it is not returned to R. *Code in C:* void test(double *vec,double *size){ vec = (double *)calloc(2

[R] Plot OctTree

2012-02-18 Thread Jaimin Dave
Hi Everyone, I have csv file which is in following format xmin,xmax,ymin,ymax,zmin,zmax I want to plot 3d graph with all the all octants being displayed as well. Any idea? I have used scatterplot3d package but it does not seem to have anything by which i can draw "octants" inside cube as well.

[R] Pass Vector from R to C

2011-06-18 Thread Jaimin Dave
Hi , I have a function which passes a vector from R to C. However the size of the vector is decided inside the c program. But as I have to pass the size while calling the function from R lot of my space is getting wasted. Is there any other alternative? I call c function as : hi<-.C("main",v1=as.d

[R] Pointers in R

2011-06-12 Thread Jaimin Dave
Hello Everyone, I am new to R and would like to create a quad tree in R. However the problem is that I don't think R has pointers. Is there any way to create a tree in R? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org maili

Re: [R] Pass String from R to C

2011-04-25 Thread Jaimin Dave
I tried using char ** but it is printing some random string. On Sat, Apr 23, 2011 at 6:08 PM, Duncan Murdoch wrote: > On 11-04-23 7:04 PM, Jaimin Dave wrote: > >> Hi, >> I am using a function which accepts the string from R and prints it. >> But when I am calling .C(&

[R] Pass String from R to C

2011-04-23 Thread Jaimin Dave
Hi, I am using a function which accepts the string from R and prints it. But when I am calling .C("main","hello"); it is printing any random thing. My C function is void main(char *str) { Rprintf("%s",str); } Can you help how to achieve this using .C interface? Thanks Jaimin [[alternativ

Re: [R] Grid on Map

2011-04-07 Thread Jaimin Dave
- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > -Original Message- > From: Jaimin Dave > Date: Mon, 4 Apr 2011 18:39:45 -0700 > To: "r-help@r-project.org&quo

[R] Grid on Map

2011-04-04 Thread Jaimin Dave
I am new to R.I want to draw grid from a csv file which contains latitude minimum ,latitude maximum ,longitude minimum ,longitude maximum.The grid should be divided into exactly 4 quadrants. The map is of NY state of USA. I want to know how can I do it. Help would be appreciated. Thanks Jaimin

[R] Points on Map

2011-03-28 Thread Jaimin Dave
Hi, I am new to R and I want to plot points on the Map of New York . I also want to divide map of New York into small grids(not fixed) .I want that these point should be plotted from a file.How can I do it?Any help would be greatly appreciated. Thanks Jaimin [[alternative HTML version d

[R] Using C code in R

2011-03-23 Thread Jaimin Dave
Hi, I am new to R and I want to know how to use C code which contains two functions one called inside another.I know that how to use C code in R if it has only one function but dont know how to do it in above case. I want to use the same in R .My C code is as follows. //#include void sayHello();

[R] QuadTree

2011-02-20 Thread Jaimin Dave
Could any one tell me how to implement QuadTree in R? Or are there any packages avaialble to implement it in R. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read