Great-- thanks for the info.
For now, hopefully I can get the behaviour I want by sticking a .Call(
'R_lazyLoadDBflush'...) [as per 'detach'] before calling 'lazyLoad'. Seems to
work on my examples, but please let me know if you don't think it'll work
generally-- if not, I could presumably crea
William Dunlap wrote:
...
if (x <= 0) NA else log(x)
variety otherwise.
Would you only want it to coerce upwards to FUN.VALUES's
type? E.g., allow
sapply(z, length, FUN.VALUE=numeric(1))
to return a numeric vector but die on
sapply(z, function(zi)as.complex(zi[1]), FUN.VALUE=numeric(1)
> -Original Message-
> From: Peter Dalgaard [mailto:p.dalga...@biostat.ku.dk]
> Sent: Wednesday, November 04, 2009 1:16 PM
> To: William Dunlap
> Cc: Duncan Murdoch; r-devel@r-project.org
> Subject: Re: [Rd] sapply improvements
>
> William Dunlap wrote:
> > It looks good on following exam
Here is a more stripped down variant generates and error on OS X for me:
mkEg <- function(tm) list(scrunge = as.POSIXct(tm))
extract <- function(db) {
e<- new.env()
lazyLoad(db, e)
as.list( e)
}
eg <- mkEg("2009-11-04 12:49:53")
eg1 <- mkEg("2009-11-0
William Dunlap wrote:
It looks good on following examples:
z <- split(log(1:10), rep(letters[1:2],c(3,7)))
sapply(z, length, FUN.VALUE=numeric(1))
Error in sapply(z, length, FUN.VALUE = numeric(1)) :
FUN values must be of type 'double'
(I'd like the error to say "... must be of type 'doubl
Full_Name: Andy Ashley
Version: 2.10.0
OS: Windows XP SP3
Submission from: (NULL) (91.105.184.105)
I am updating a legacy program which called Rterm from within Excel VBA as
follows:
Rexe = """C:\Program Files\R\R-2.4.0\bin\Rterm.exe"""
Roptions = ""
env_vars = " R_USER=" & dirname
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-
> project.org] On Behalf Of Stefan Evert
> Sent: Wednesday, November 04, 2009 4:40 AM
> To: michael_ka...@earthlink.net
> Cc: r-b...@r-project.org; r-de...@stat.math.ethz.ch
> Subject: Re: [Rd] Cannot Ch
> -Original Message-
> From: William Dunlap
> Sent: Wednesday, November 04, 2009 12:53 PM
> To: 'Duncan Murdoch'
> Cc: r-devel@r-project.org
> Subject: RE: sapply improvements
>
> It looks good on following examples:
>
> > z <- split(log(1:10), rep(letters[1:2],c(3,7)))
> > sapply(z, len
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-
> project.org] On Behalf Of Stefan Evert
> Sent: Wednesday, November 04, 2009 4:40 AM
> To: michael_ka...@earthlink.net
> Cc: r-b...@r-project.org; r-de...@stat.math.ethz.ch
> Subject: Re: [Rd] Cannot Ch
It looks good on following examples:
> z <- split(log(1:10), rep(letters[1:2],c(3,7)))
> sapply(z, length, FUN.VALUE=numeric(1))
Error in sapply(z, length, FUN.VALUE = numeric(1)) :
FUN values must be of type 'double'
(I'd like the error to say "... must be of type 'double',
not 'integer'", to
S4 generics can specify a valueClass. Perhaps that could be used in
those cases.
On Wed, Nov 4, 2009 at 3:24 PM, Duncan Murdoch wrote:
> On 11/4/2009 12:15 PM, William Dunlap wrote:
>>>
>>> -Original Message-
>>> From: r-devel-boun...@r-project.org
>>> [mailto:r-devel-boun...@r-project.o
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
> Sent: Wednesday, November 04, 2009 12:19 PM
> To: Duncan Murdoch
> Cc: William Dunlap; r-de...@stat.math.ethz.ch
> Subject: Re: [Rd] error in install.packages() (PR#14042)
>
> I agree it is a good idea, but a
This happens in as.matrix(), which gets called by apply().
When you've got a mixed-mode dataframe like this, as.matrix() converts
everything to character. But, the rules it uses for each column don't
seem to be entirely consistent regarding whether columns are
space-padded to make each elemen
On 11/4/2009 12:15 PM, William Dunlap wrote:
-Original Message-
From: r-devel-boun...@r-project.org
[mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Wednesday, November 04, 2009 8:47 AM
To: michael.m.spie...@gmail.com
Cc: r-b...@r-project.org; r-de...@stat.math.e
Well documented in ?as.matrix.
Ignore my previous post.
On Wed, 4 Nov 2009, Greg Snow wrote:
The apply function was meant to work on matrices and arrays, when you use it on
a data frame, the frame is first converted to a matrix. Since your data frame
has columns of different modes, the log
I agree it is a good idea, but a new name seems justified to avoid
confusion.
On Wed, 4 Nov 2009, Duncan Murdoch wrote:
On 11/4/2009 12:15 PM, William Dunlap wrote:
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On Behalf Of Duncan Murdo
The apply function was meant to work on matrices and arrays, when you use it on
a data frame, the frame is first converted to a matrix. Since your data frame
has columns of different modes, the logical column is converted to character
and the matrix is of the single mode character. That is wha
Hello,
X <- data.frame(letters=letters[1:3], flag=c(TRUE, FALSE, TRUE))
X
letters flag
1 a TRUE
2 b FALSE
3 c TRUE
apply(X, 1, as.list)
[[1]]
[[1]]$letters
[1] "a"
[[1]]$flag
[1] " TRUE"
[[2]]
[[2]]$letters
[1] "b"
[[2]]$flag
[1] "FALSE"
[[3]]
[[3]]$letters
[1] "
On 11/4/2009 12:15 PM, William Dunlap wrote:
-Original Message-
From: r-devel-boun...@r-project.org
[mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Wednesday, November 04, 2009 8:47 AM
To: michael.m.spie...@gmail.com
Cc: r-b...@r-project.org; r-de...@stat.math.e
If you mean us to run the code you supplied:
1. There are two generic backsolve() functions, one in the gobal
environment and one in SparseM:
> showMethods(backsolve)
Function: backsolve (package .GlobalEnv)
r="ANY"
r="matrix"
(inherited from: r="ANY")
> showMethods(SparseM::backsolve)
Fu
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch
> Sent: Wednesday, November 04, 2009 8:47 AM
> To: michael.m.spie...@gmail.com
> Cc: r-b...@r-project.org; r-de...@stat.math.ethz.ch
> Subject: Re: [Rd] error in
On 11/4/2009 11:05 AM, michael.m.spie...@gmail.com wrote:
Full_Name: Michael Spiegel
Version: 2.10
OS: Windows Vista
Submission from: (NULL) (76.104.24.156)
The following error is produced when attempting to call install.packages. Here
is the results of the traceback:
source('http://openmx.p
On 11/4/2009 11:05 AM, michael.m.spie...@gmail.com wrote:
Full_Name: Michael Spiegel
Version: 2.10
OS: Windows Vista
Submission from: (NULL) (76.104.24.156)
The following error is produced when attempting to call install.packages. Here
is the results of the traceback:
source('http://openmx.p
I'm hoping that someone with deeper insight into S4 than I,
that is to say virtually everyone reading this list, could help
resolve the following problem in SparseM. We have
setGeneric("backsolve",
function(r, x, k = NULL, upper.tri = NULL, transpose = NULL,
twice = TRUE, ...)
Full_Name: Michael Spiegel
Version: 2.10
OS: Windows Vista
Submission from: (NULL) (76.104.24.156)
The following error is produced when attempting to call install.packages. Here
is the results of the traceback:
> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
Error in f(res) : invalid su
I frequently run scripts that generate multiple graphs. Unless you specify a
specific window location, dev.new superimposes all new graphics windows exactly
on top of each other. It would be nice to have a "cascade=TRUE" option in
dev.new to prevent windows from being hidden. A hasty approxim
What makes you think this is a bug in R?
Whenever I try changing a function, it keeps coming up with the same
error
message.
I have the function
CN_state_log_sum=function(Tot_log_sum){ #estimate copy number state
for the log
[...]
}
When I try to run it in the loop:
for (j in 1:length(B
Ah, thanks, now I understand the mode of operation and will work on a more
robust fix than exporting the functions.
Regards, Ulrike
-- Original Message ---
From: Uwe Ligges
To: Ulrike Grömping
Cc: r-devel@r-project.org
Sent: Wed, 04 Nov 2009 12:19:59 +0100
Subject: Re: [Rd]
Well,
> swiss.lm
Call:
lm.default(formula = Fertility ~ Education + Examination, data = swiss)
That means the call is registered as lm.default and update calls that
one (and it is hidden in your namespace.
You can fix it on your side so that the call is registered as lm(.)
in the lm ob
Full_Name: Niels
Version: <= 2.10.0
OS: Windows
Submission from: (NULL) (76.182.102.23)
The reordering option in library gplots : heatmap.2 is broken. Re-ordering of
the dendrogram is supposed to work by providing a vector of ordering weighs in
Rowv. However, the tests in line 131 and 174 are no
Full_Name: Michael Aaron Karsh
Version: 2.8.0
OS: Windows XP
Submission from: (NULL) (75.61.102.255)
Whenever I try changing a function, it keeps coming up with the same error
message.
I have the function
CN_state_log_sum=function(Tot_log_sum){ #estimate copy number state for the log
sum approac
31 matches
Mail list logo