Displaying 20 results from an estimated 700 matches similar to: "mapply() gives seg fault (PR#8332)"
2003 Oct 14
3
mapply() gives seg fault
Hello everybody.
I've been experimenting with mapply(). Does anyone else have problems with:
R> mapply(rep,times=1:4, MoreArgs=42)
(I get a seg fault).
robin
R> R.version
_
platform powerpc-apple-darwin6.6
arch powerpc
os darwin6.6
system powerpc, darwin6.6
status beta
major 1
minor 8.0
year 2003
month 10
day 02
language R
>
2005 Apr 05
1
Install R 2.0 package on R 1.9.1
Hi,
I'm wondering if it is possible to install a package for R 2.0 on
R 1.9.1 on Mac OS X? I'm getting this error which seems to be known issue:
library("quantreg")
Error in firstlib(which.lib.loc, package) :
couldn't find function "lazyLoad"
In addition: Warning message:
package quantreg was built under R version 2.0.1
Error in
2003 Aug 21
2
automatic logging of commands
Is there an R function that automatically writes all input and output to a
file? I would at least like it to log all the commands I enter, and to
preferably also write the standard output to the file as well as to the
screen. (The ideal would be to write the input to one file and both the
input and output to another file.) I tried R2HTML for this, but I could not
get it to work consistently.
I am
2003 May 26
1
R's DYLD_LIBRARY_PATH override problems on Mac OS X
In Mac OS X native version: The R shell wrapper (bin/R) overrides
default library search path with DYLD_LIBRARY_PATH and adds (among
others) /usr/X11R6/lib. This causes problems when modules need
(directly or indirectly) libraries from Apple's frameworks which are
masked by X11. Examples for such packages are SJava and RGL. SJava
needs JavaVM which in turn loads OpenGL framework. RGL
2006 Mar 14
1
R CMD check: problems possibly from mapply?
Dear expeRts,
I am trying to wrap up a package "utilities" (for my internal use). After
adding a function datNAtreat that uses mapply, R CMD check gives WARNINGs
for "S3 generic/method consistency", "checking replacement functions"
and?"checking foreign function calls", all of which are accompanied by the
following error message:
Error in .try_quietly
2013 Dec 06
2
Using assign with mapply
I have a data frame whose first colum contains the names of the variables
and whose second colum contains the values to assign to them:
: kkk <- data.frame(vars=c("var1", "var2", "var3"),
vals=c(10, 20, 30), stringsAsFactors=F)
If I do
: assign(kkk$vars[1], kkk$vals[1])
it works
: var1
[1] 10
However, if I try with mapply
2006 Aug 31
2
Wish: keep names in mapply() result
Hello!
I have noticed that mapply() drops names in R 2.3.1 as well as in
r-devel. Here is a simple example:
l <- list(a=1, b=2)
k <- list(1)
mapply(FUN="+", l, k)
[1] 2 3
mapply(FUN="+", l, k, SIMPLIFY=FALSE)
[[1]]
[1] 2
[[2]]
[1] 3
Help page does not indicate that this should happen. Argument USE.NAMES
does not have any effect here as it used only in a bit special
2004 Feb 26
1
unable to install dse in mac OS X 10.3
I would like to request help with the installation of dse in raqua in mac
os x 10.3. I get the following error message after the messages indicating
that parts were successfully installed.
I would be most grateful for a solution.
-----------------------------------------
* Installing *source* package 'setRNG' ...
** R
** inst
** help
>>> Building/Updating help pages for
2012 Dec 11
1
Rprof causing R to crash
I'm trying to use Rprof() to identify bottlenecks and speed up a particullary
slow section of code which reads in a portion of a tif file and compares
each of the values to values of predictors used for model fitting. I've
written up an example that anyone can run. Generally temp would be a
section of a tif read into a data.frame and used later for other processing.
The first portion
2008 Mar 07
3
merging environments
Despite the spirited arguments of various R-core folks
who feel that mle() doesn't need a "data" argument, and
that users would be better off learning to deal with function
closures, I am *still* trying to make such things work
in a reasonably smooth fashion ...
Is there a standard idiom for "merging" environments?
i.e., suppose a function has an environment that I want
2010 Jul 22
0
sweep / mapply question
Dear list,
I have a matrix, spc, that should row-wise be interpolated:
E.g.
spc <- matrix (1:1e6, ncol = 250, nrow = 4000, byrow = TRUE)
spc [1:10, 1:10]
shifts <- seq_len (nrow (spc))
wl <- seq_len (ncol (spc))
interpolate <- function (spc.row, shift, wl)
spline (wl + shift, spc.row, xout = wl, method = "natural")$y
interpolate (spc [1,], shift = shifts [1], wl = wl)
2011 Feb 23
2
list multiplied by a factor / mapply
Dear list,
this works fine:
x <- split(iris, iris$Species)
x1 <- lapply(x, function(L) transform(L, g = L[,1:4] * 3))
but I would like to multiply each Species with another factor:
setosa by 2, versicolor by 3 and virginica by 4. I've tried mapply but
without success.
Any thoughts? Thanks for any idea!
Patrick
2004 Mar 19
0
osx/fink: cannot do "R INSTALL" (library mixup)
Hello friends. I've just switched from linux to osx, and I'm liking
it, except now that I'm getting down to brass tacks, and needing to
install some R packages, I'm at a roadblock. I'm hoping someone can
help.
My R is installed from a .dmg, and resides as follows:
$ which R
/usr/local/bin/R
The problem is that I cannot build packages. For example, see the
below (which
2011 Feb 02
2
Help me apply mapply
Hello all I would like to ask your help use mapply.
I have a function called findCell that takes two arguments(x,sr)
where x is a vector of size two (e.g x<-c(2,3) and sr is a matrix.
I would like to call many times the findCell function (thus I need mapply) for different x inputs but always for the same sr.
as x is a vector of size two (two cells) I want to pass inside inside the following
2009 Oct 14
1
using mapply to avoid loops
Hello, I would like to use mapply to avoid using a loop but for some reason, I can't seem to get it to work. I've included copies of my code below. The first set of code uses a loop (and it works fine), and the second set of code attempts to use mapply but I get a "subscript out of bounds" error. Any guidance would be greatly appreciated. Xj, Yj, and Wj are also lists, and s2,
2011 Sep 29
1
Looking for internal of a function
Dear all, when I look at the internal of mapply() function, I see a line of
code:
answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(),
PACKAGE = "base")
Can somebody please tell me how to find the source code of 'do_mapply'
Thanks,
[[alternative HTML version deleted]]
2010 Dec 02
2
Hmisc label function applied to data frame
Hello,
I'm attempting to create a data frame with correlations between every pair
of variables in a data frame, so that I can then sort by the value of the
correlation coefficient and see which pairs of variables are most strongly
correlated.
The sm2vec function in the corpcor library works very nicely as shown here:
library(Hmisc)
library(corpcor)
# Create example data
x1 = runif(50)
x2 =
2004 Mar 19
0
Fwd: osx/fink: cannot do "R INSTALL" (library mixup)
Begin forwarded message:
> From: Dan Kelley <Dan.Kelley at Dal.Ca>
> Date: March 19, 2004 12:00:01 PM AST
> To: Don MacQueen <macq at llnl.gov>
> Subject: Re: [R] osx/fink: cannot do "R INSTALL" (library mixup)
>
> That works perfectly! THanks. I did
> 524 export PKG_LIBS="-L/usr/local/lib -L/sw/lib"
> 525 R INSTALL pspline
> and
2003 Oct 01
1
Macintosh binaries; was: Rcmdr and Macintosh
I am a Windows user and trying to make life easier for my Mac-using students. After investigating the Mac situation more, it appears that the key to easy use is having precompiled binaries. However the packages I am interested in (Rcmdr and its required package, car) do not have one. I do not have easy access to a Mac, so I have a plea to Macintosh users: could someone please create them if it is
2006 Jun 29
3
advice on arguments
I have a general style question about R coding.
Suppose I'm writing a function (foo1) that calls other functions
(foo2, foo3, ...) which have complicated argument
lists (e.g. optim(), plot()), _and_
I may be calling several different functions in the body of
foo1. Since foo2 and foo3 have different sets of arguments, I
can't just use "..." ; I did write some code a while ago