similar to: Compile C files

Displaying 20 results from an estimated 10000 matches similar to: "Compile C files"

2011 Dec 22
3
delete all columns with all values equal to zero
Hello all: I'm sure this is quite simple, but I tried several options and I still can't get I right. I've got a data.frame and I want to delete all columns of which the sum is zero. Any ideas? Thanks, Frederico Mestre [[alternative HTML version deleted]]
2012 Apr 10
2
Error: cannot allocate vector of size...
Hello: While running R doing the analysis of my data I (using packages such as BIOMOD or e1071) get the following error as a result of several of my analysis: Error: cannot allocate vector of size 998.5 Mb In addition: Warning messages: 1: In array(c(rep.int(c(1, numeric(n)), n - 1L), 1), d, dn) : Reached total allocation of 4095Mb: see help(memory.size) 2: In array(c(rep.int(c(1,
2012 Sep 03
2
adding points to a point pattern
Hello all: Is there any way to add points to a point pattern, while keeping a given minimum distance amongst this new points and the pre-existing points? Thanks, Frederico [[alternative HTML version deleted]]
2015 Sep 29
1
Error possibly related with environments/namespace
Hello all, I've got a problem with a function in a R package I've developed (MetaLandSim). One of the outputs of my function is the plotting of four images (combining a graph and a map). This plotting is made in a graphical device, with the graph in one side and the map in the other. My function works perfectly fine until it has to plot the map. Then it stops and I get an error.
2012 Jul 30
1
cluster of points
Hello: What I want to do is quite simple, but I can't find a way. I have a data frame with several points (x and y coords). I want to add another column with cluster membership. For example aggregate all the points that stand within a distance of 40 from each other. I've tried using "nncluster" from the package nnclust, but the results are not correct, for some
2008 Mar 15
1
Experimental R_has_slot() utility
Dear list, The utility "R_has_slot" mentioned in the file NEWS ("Experimental R_has_slot() utility supplementing R_do_slot()") appears to be missing from a fresh checkout of the development branch. $ svn up At revision 44759. $ grep -i has_slot `find include -name '*.h'` $ grep -i _slot `find include -name '*.h'` include/Rdefines.h:#define GET_SLOT(x, what)
2005 Oct 31
1
R-functions in C-Code
Dear R users, I would like to use several R functions from a C-code and I have read the "Introduction to the .C Interface to R". Unfortunately, my shared library with the C-code works only in cases where I use R-routines that are defined Rmath.h, eg. ************************************* less test.c: #include <R.h> #include <Rinternals.h> #include <Rmath.h> void
2005 Oct 03
1
storage.mode, C data types and speed
Hi, I am trying to speed up part of an algorithm in which certain columns of a large matrix (X) are replaced by the element-wise product of a matrix (M) and a vector (v). In R, the code might be X[, ind] <- M * v I have written a small C routine to do this for me, but the timing depends on how I define the storage.mode of the objects in R and the data types in C, in a way which I don't
2007 Aug 23
1
.Call and to reclaim the memory by allocVector
Hi, I am not sure if this is a bug and I apologize if it is something I didn't read carefully in the R extension manual. My initial search on the R help and R devel list archive didn't find useful information. I am using .Call (as written in the R extension manual) for the C code and have found that the .Call didn't release the memory claimed by allocVector. Even after applying
2007 Aug 23
1
.Call and to reclaim the memory by allocVector
Hi, I am not sure if this is a bug and I apologize if it is something I didn't read carefully in the R extension manual. My initial search on the R help and R devel list archive didn't find useful information. I am using .Call (as written in the R extension manual) for the C code and have found that the .Call didn't release the memory claimed by allocVector. Even after applying
2008 Aug 15
3
Rcommander installation fails on Fedora 9
Fedora 9 R 2.7.1 I tried to install R on my Linux system using install.packages("Rcmdr", dependencies=TRUE). I received many, many, many error messages. I hope someone can suggest a fix. The output from warnings() is listed below. A more detailed list of errors from one of the failed installations is listed below the warnings: > warnings() Warning messages: 1: In
2001 Sep 10
1
problems linking c++ code
I've been trying to learn about dynamically loading subroutines in R. Ultimately I would like to use this approach to implement some simulations. For the moment though, I've run into a problem compiling c++ code and loading it into R. The 'C/C++' and 'R'code below works fine when compiled and linked with gcc, but gives an error when the library is compiled and linked with
2007 Apr 06
2
wishlist: additional argument in R_tryEval (Rinternals.h)
Hi, R_tryEval, exported in Rinternals.h but not part of the API, is currently defined as: R_tryEval(SEXP e, SEXP env, int *ErrorOccurred); I'm trying to embed R in an application (basically yet another GUI), and this has been very helpful to catch errors. It would be even more helpful if it also gave access to the visibility flag. I can wrap this in a call to withVisible, and that works
2013 Apr 11
1
La_svd compiler error
Dear All, I have been trying to compile a package for windows that we have written. Since R version 3.0.0 the package doesn't compile any more. (On Linux the package compiles without errors). The error specifically says: gcc -m32 -I"C:/PROGRA~1/R/R-30~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c
2012 Jun 21
2
debug R objects at C level
Dear R-devel, I am now at a debugging phase, and would like to inspect the (individual) values in an arbitrary R vector. It should be simple, but after hours of reading I am simply unable to find the right information. A possible C code is: ????????????????? # include <R.h> # include <Rinternals.h> # include <R_ext/Rdynload.h> SEXP foo(SEXP x) // where x is a vector passed by
2011 Oct 24
2
C function is wrong under Windows 7
Dear mailing list, I have a C function that gives me a wrong result when I run it under Windows 7. This is the code under Linux (RHEL5): > library(phenoTest) > data(epheno) > sign <- sample(featureNames(epheno))[1:20] > score <- getFc(epheno)[,1] > head(score) 1007_s_at 1053_at 117_at 121_at 1255_g_at 1294_at -1.183019 1.113544 1.186186 -1.034779 -1.044456
2005 Jan 24
4
converting R objects to C types in .Call
Dear People, I'm trying to write an R wrapper for a C++ library, using .Call. I've never used .Call before. I'm currently having some difficulties converting a R character string to a C one. Here is a little test program. #include <R.h> #include <Rinternals.h> #include <stdio.h> SEXP testfn(SEXP chstr) { char * charptr = CHAR(chstr); printf("%s",
2006 Feb 08
1
Rf_protect in Rinternals.h
Hello! I'd like to ask you a question about c (macros): In Rinternals.h are defined: a) SEXP Rf_protect(SEXP); b) #define protect Rf_protect c) #define PROTECT(s) protect(s) As far as I understand the calls Rf_protect( x ), protect( x ) and PROTECT( x ) are all equalent. So whats the reason that there are 2 macros defined? Why 3 times the same when 1 distinct function would be
2019 Mar 01
1
Surprising results from INTEGER_GET_REGION with ALTREP object
Dear Listmembers, wanting to learn more about ALTREP I wrote the following function to extract a subsequence from an integer vector: #include <Rinternals.h> SEXP integer_get_region(SEXP _x, SEXP _i, SEXP _n) { int i = INTEGER(_i)[0]; int n = INTEGER(_n)[0]; SEXP result = PROTECT(Rf_allocVector(INTSXP, n)); INTEGER_GET_REGION(_x, i, n, INTEGER(result)); UNPROTECT(1); return
2008 Jul 10
2
Help on Installing Matrix Package in Linux (Fedora)
Hi, I have been trying to install the Matrix package on R running in Linux (Fedora). But, I get the following error message (at the bottom). I am logged in as the root user. Any help would be appreciated! Thanks! -Hyunseung Kang * Installing *source* package 'Matrix' ... Using GNU make for building the package ** libs ** arch - gcc -m32 -std=gnu99 -I/usr/include/R