similar to: Recall

Displaying 20 results from an estimated 10000 matches similar to: "Recall"

2008 Jan 03
1
question from Blue book
Hi R people: On page 235 of the Blue Book (Becker, Chambers, and Wilks), there is a "compose2" function. compose2 <- function(f,g) { gg <- substitute(g1(x)) print(gg) gg[[1]] <- g ff <- substitute(f1(y)) print(ff) ff[[1]] <- f ff[[2]] <- gg print(ff) fun <- function(x){ NULL } fun[[2]] <- ff fun } However, when I run this function using sum
2023 Nov 14
1
data.frame weirdness
On Tue, 14 Nov 2023 at 09:41, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > Also why should that difference result in different behavior? That's justifiable, I think; consider: > d1 = data.frame(a = 1:4) > d2 = d3 = data.frame(b = 1:2) > row.names(d3) = c("a", "b") > data.frame(d1, d2) a b 1 1 1 2 2 2 3 3 1 4 4 2 > data.frame(d1,
2023 Nov 14
1
data.frame weirdness
Also why should that difference result in different behavior? On Tue, Nov 14, 2023 at 9:38?AM Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > In that case identical should be FALSE but it is TRUE > > identical(a1, a2) > ## [1] TRUE > > > On Tue, Nov 14, 2023 at 8:58?AM Deepayan Sarkar > <deepayan.sarkar at gmail.com> wrote: > > > >
2023 Nov 14
1
data.frame weirdness
In that case identical should be FALSE but it is TRUE identical(a1, a2) ## [1] TRUE On Tue, Nov 14, 2023 at 8:58?AM Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote: > > They differ in whether the row names are "automatic": > > > .row_names_info(a1) > [1] -3 > > .row_names_info(a2) > [1] 3 > > Best, > -Deepayan > > On Tue, 14 Nov
2019 Oct 11
1
New matrix function
Also note that the functionality discussed could be regarded as a generalization of matrix multiplication where * and + are general functions and in this case we have * replaced by == and + replaced by &. On Fri, Oct 11, 2019 at 10:46 AM Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > Using the example in the link here are two one-liners: > > A <-
2016 Jun 27
1
stack problem
One would normally want the original order that so that one can stack a list, operate on the result and then unstack it back with the unstacked result having the same ordering as the original. LL <- list(z = 1:3, a = list()) # since we can't do s <- stack(LL,. drop = FALSE) do this instead: s <- transform(stack(LL), ind = factor(as.character(ind), levels = names(LL))) unstack(s)
2018 Jan 28
1
Plotting quarterly time series
Using Achim's d this also works to generate z where FUN is a function used to transform the index column and format is also passed to FUN. z <- read.zoo(d, index = "time", FUN = as.yearqtr, format = "Q%q %Y") On Sun, Jan 28, 2018 at 4:53 PM, Achim Zeileis <Achim.Zeileis at uibk.ac.at> wrote: > On Sun, 28 Jan 2018, phil at philipsmith.ca wrote: > >> I
2018 Jan 26
0
Portable R in zip file for Windows
Can you clarify what the nature of the security restriction is? If you can't run the R installer then how it is that you could run R? That would still involve running an external exe even if it came in a zip file. Could it be that the restriction is not on running exe files but on downloading them? If that is it then there are obvious workarounds (rename it not to have an exe externsion or
2023 Nov 14
1
data.frame weirdness
They differ in whether the row names are "automatic": > .row_names_info(a1) [1] -3 > .row_names_info(a2) [1] 3 Best, -Deepayan On Tue, 14 Nov 2023 at 08:23, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > What is going on here? In the lines ending in #### the inputs and outputs > are identical yet one gives a warning and the other does not. > >
2018 Jan 26
2
Portable R in zip file for Windows
Pretty good question Gabor. I can execute R once it is installed (if someone with rights installs it before) but not the installer. I can download the installer (with some pain). I know that some installers are actually compressed files in disguise, but I think this is not the case with R, right? I will study the exact nature of the restriction, and get back to you. Nevertheless, having a
2018 Jul 24
2
oddity in transform
The idea is that one wants to write the line of code below in a general way which works the same whether you specify ix as one column or multiple columns but the naming entirely changes when you do this and BOD[, 1] and transform(BOD, X=..., Y=...) or other hard coding solutions still require writing multiple cases. ix <- 1:2 transform(BOD, X = BOD[ix] * seq(6)) On Tue, Jul 24, 2018 at
2016 Jun 27
2
stack problem
stack() seems to drop empty levels. Perhaps there could be a drop=FALSE argument if one wanted all the original levels. In the example below, we may wish to retain level "b" in s$ind even though component LL$b has length 0. > LL <- list(a = 1:3, b = list()) > s <- stack(LL) > str(s) 'data.frame': 3 obs. of 2 variables: $ values: int 1 2 3 $ ind : Factor
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi Thanks Gabor for your suggestion. I am posting the code that worked for me. dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 = c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 = c('aaaa','dddd','bbbb','eeee','ffff'))); dataframe3 =
2015 May 22
1
returnValue()
In R devel rev.66393 (2014-08-15) it was possible to do this: trace(optim, exit = quote(str(returnValue()))) but returnValue() does not seem to be available any more. The above was useful to get the output of a function when it was called deep within another function that I have no control over. Has this been replaced by some other equivalent function? P.S. This demonstrates that it no
2018 Jul 29
2
odd behavior of names
The first component name has backticks around it and the second does not. Though not wrong, it seems inconsistent. list(a = 1, b = 2) ## $`a` ## [1] 1 ## ## $b ## [1] 2 R.version.string ## [1] "R version 3.5.1 Patched (2018-07-02 r74950)" -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
2023 Mar 08
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
That's an interesting example, as it's conceptually similar to what Pavel is proposing, but structurally different. gsubfn() is more complicated than a simple switch in the body of the function, and wouldn't work well as an anonymous function. Multiple dispatch can nicely encompass both of these cases. For replace(), library(S7) replace <- new_generic("replace",
2016 Dec 01
2
Different results for cos,sin,tan and cospi,sinpi,tanpi
Hi, i try sin, cos, and tan. > sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi) [1] 0.5444181 0.8388140 1.5407532 However, *pi results the following > sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45) [1] 1 0 0 Please try whether the following becomes all right. diff -ruN R-3.3.2.orig/src/nmath/cospi.c R-3.3.2/src/nmath/cospi.c --- R-3.3.2.orig/src/nmath/cospi.c 2016-09-15
2011 Apr 29
1
error while checking package size during Rcmd check
I am receiving this message during Rcmd check proto-3.9.2.tar.gz using "R version 2.13.0 Patched (2011-04-25 r55638)" * checking installed package size ...Error in if (total > 1024 * 5) { : missing value where TRUE/FALSE needed Execution halted I don't get this under R.2.12.x. The size of the tar.gz file is under 600K. What causes this or if its too hard to tell from the
2011 Dec 01
1
Standardizing included packages
It seems that R is mostly distributed with the tcltk package but not always. Is there some reason for this inconsistency? It would be nice if one could count on those packages that are distributed on the Windows version of R being distributed on all other platforms too. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
2016 Mar 18
1
for in r-devel
Regarding, this news item for r-devel: ?for()? loops are generalized to iterate over any object with ?[[? and ?length()? methods. Thanks to Herv? Pag?s for the idea and the patch. Below dd is an object for which [[ and length work but the result is still numeric rather than Date class in "R Under development (unstable) (2016-03-15 r70334)" as observed in the comments to: