Displaying 20 results from an estimated 2000 matches similar to: "[SOLVED] GET_DIM() crash on Windows only"
2004 Jun 22
3
[Q] GET_DIM() crash on Windows only
I have the following contrived code in package format.
On Solaris and Mac OS X, code runs just fine. On Windows,
it crashes the R environment with the "Send Bug Report"
dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries
with the same result. PCs otherwise appear properly
configured for creating R packages. Anything blatantly
wrong? Suggestions?
TIA
Relevant files from package
2005 Feb 09
1
Compiler-specific flags with PKG_CFLAGS
On Tue, 8 Feb 2005, Kurt Hornik wrote:
> This concerns the packages...
> for which current versions of r-devel now report problems with
> non-portable compilation flags in Makevars[.in] files:
>
> Problems in package 'rwt':
> Non-portable flags in variable 'PKG_CFLAGS':
> -Wall -ansi -pedantic
>
> These flags are mostly GCC specific and not
2004 Sep 15
7
Splitting vector into individual elements
Is there a means to split a vector into its individual
elements without going the brute-force route for arguments
to a predefined function call?
offred.rgb <- c(1, 0, 0) * 0.60;
## Brute force style
offred.col <- rgb(offred.rgb[1],
offred.rgb[2],
offred.rgb[3],
names = "offred")
## Desired style
2005 Oct 05
1
Problems with autoconf example from r-ext.
Dear R-developers,
I am trying to reproduce the autoconf.ac example from R-ext and fail.
My autoconf file looks like this
[autoconf.ac]
# original by Friedrich Leisch, much changed by BDR
AC_INIT([SBMLodeSolveR])
dnl Select an optional include path, from a configure option
dnl or from an environment variable.
AC_ARG_WITH([sbmlode-include],
2006 Apr 20
0
Breakdown a number [Broadcast]
I meant to send this to R-help, but it went to Gabor instead...
This is my shot at it using diff(), assuming breaks is in non-decreasing
order:
chop <- function(x, breaks) {
s <- sign(x - breaks)
if (x <= breaks[1]) {
ans <- x
} else {
numPieces <- sum(s == 1)
ans <- diff(c(0, breaks[1:numPieces], x))
}
ans
}
Some tests:
>
2007 Jan 26
1
Makevars PKG_LIBS ignored by SHLIB (PR#9473)
Full_Name: Rick Sayre
Version: 2.4.0
OS: Windows
Submission from: (NULL) (138.72.27.164)
PKG_LIBS works fine on *nix
on windows, it seems to be ignored by the "SHLIB" script
so, R CMD SHLIB blah
properly uses PKG_CPPFLAGS and PKG_CFLAGS from Makevars, but PKG_LIBS is
ignored
2004 Jul 12
2
.Platform addition (was Re: where does R search when source()?)
On Sun, 11 Jul 2004, Gabor Grothendieck wrote:
> search.path <-
> function(fn,
> paths = strsplit(Sys.getenv("PATH"), split = ";")[[1]],
> fsep = "\\") {
> for(d in paths) {
> f <- file.path(d, fn, fsep = fsep)
> if (file.exists(f))
> return(f)
> }
> return(NULL)
> }
>
2005 Feb 14
2
Test Tools
Anyone aware of tools available that can provide complexity
metrics and/or code coverage analysis for R source?
----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
2008 Nov 20
3
Turning off compiler optimization
Hi. I am writing some code in C that I would like to link into R.
My Makevars file is:
PKG_CPPFLAGS=-I/usr/local/include
PKG_LIBS=-L/usr/local/lib -lgsl
PKG_CFLAGS = -Wall -O0 -g -p -pg
The source file is core.c,. and I am compiling using R CMD SHLIB
core.c The output is
gcc -arch x86_64 -O3 -g -p -std=gnu99 -I/Library/Frameworks/
R.framework/Resources/include
2006 Feb 08
1
invalid graphics state using dev.print (fwd)
On Mon, 6 Feb 2006 18:12, Simon Urbanek wrote:
> On Feb 6, 2006, at 5:24 PM, Paul Roebuck wrote:
>
>> Tried on R-Sig-Mac with no responses, but I need some kind
>> of answer.
>> [...]
>> Does the following work on your system?
>
> Interesting, no, it doesn't either. For png and pdf I use
> Quartz + quartz.save (it produces much nicer results) so
> I
2004 Aug 25
2
[Q] Apply Function Over Multiple Array Margins
Is there a canonical means to apply a function
over multiple arrays simultaneously? For example,
if I wanted to plot each line with a different color?
Or is a for loop conversion my best option?
x <- seq(0, 8, by = 2)
y <- matrix(1:15, nrow = 5, byrow = TRUE)
my.colors <- heat.colors(3)
drawLines <- function(row) {
lines(x, row) # want corresponding 'my.colors' here
}
2020 Jul 15
2
Openblas?
Hello,
I thought that I should try openblas when building a CRAN package
containing lots of old (twentieth century) C-code with frequent calls to
blas and lapack routines. I have the following options on my Ubuntu
20.04 machine:
Selection Path Priority Status
------------------------------------------------------------
* 0
2011 Feb 20
2
Problem using F77_CALL(dgemm) in a package
Dear R-devel,
I've written a numerical solver for SOCPs (second order cone programs)
in R, and now I want to move most of the solver code into C for speed.
I've written combined R/C packages before, but in this case I need to
do matrix operations in my C code. As I have never done that before,
I'm trying to write some simple examples to make sure I understand the
basics. I am stuck
2005 May 18
2
R Include File Guards
R 2.1.0/src/include from 2005/04/18 download
Naming inconsistent for guards as well but that's pedantic.
Simple convention:
file <foo.h>
#ifndef R_FOO_H
file <R_ext/bar.h>
#ifndef R_EXT_BAR_H
Missing guards:
<IOStuff.h>
<Internal.h>
<Parse.h>
<R_ext/GraphicsBase.h>
<R_ext/GraphicsDevice.h>
<R_ext/GraphicsEngine.h>
2005 Jul 19
2
R_AllocatePtr
Had been looking into Luke Tierney's R_AllocatePtr() and
was left with a question about exactly when does R reclaim
heap memory. Implication of 'simpleref.nw' is that one can
allocate C data on the R heap, and as long as pointer object
is alive, the data and pointer will remain valid. But it
calls allocString() which is implemented using R_alloc().
'Writing R Extensions" says
2004 Sep 28
2
S4 method selection based on second argument
I'm translating some Matlab code and need some help figuring
out how to change this call into an S4 generic method.
In matlab, there's a function called 'repmat' with three
calling sequences (all I have to deal with anyway):
1) B = repmat(A, m, n)
2) B = repmat(A, [m n])
3) B = repmat(A, n)
In all cases, A is the fill value, m is number of rows,
and n is number of
2004 Jul 06
1
Enumeration in R
I want the equivalent of this 'C' declaration.
enum StoplightColor {
green = 3,
yellow = 5,
red = 7
};
This mostly works except the validity checking doesn't
seem to occur automatically. What didn't I do to enable
it?
setClass("stoplightColor",
representation(value = "integer"),
prototype = integer(1))
2004 Nov 09
1
Need car() and cdr() for '...'
Needed to redefine function "sum" for my MATLAB package.
There's something similar in Chambers's Green Book (pg 351)
so I modified it as such:
library(methods)
setGeneric("sum", function(x, ..., na.rm = FALSE) {
if (nDotArgs(...) > 0)
sum(c(sum(x, na.rm = na.rm),
sum(..., na.rm = na.rm)))
else
standardGeneric("sum")
})
2006 Jun 19
0
Fwd: [R-SIG-Mac] Window titles
On Mon, 19 Jun 2006, Simon Urbanek wrote:
> On Jun 17, 2006, at 8:02 AM, Paul Roebuck wrote:
>
> > Is there a means to provide a title for a Quartz window?
>
> Yes, now introduced in 3244: you can specify the desired name in the
> call to quartz, e.g.
> quartz("My Precious Plot")
> We have never used the device name, so now we have at least some use
>
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