Re: [Rd] order of operations

2021-08-27 Thread Gabor Grothendieck
a reasonable answer can be extracted from a given body of data. > ~ John Tukey > > /// > > <https://www.inbo.be> > > > Op vr 27 aug. 2021 om 17:18 schreef Gabor Grothendieck < > ggrothendi...@gmail.com>: > >> Are there any guarantees

Re: [Rd] order of operations

2021-08-27 Thread Gabor Grothendieck
t guaranteed should be > flagged by the language at compile time (or when interpreted) and refuse to > go on. > > All I can say with computer languages and adding ever more features, > with greater power comes greater responsibility and often greater > confusion. > > >

[Rd] assignment

2021-12-27 Thread Gabor Grothendieck
In a recent SO post this came up (changed example to simplify it here). It seems that `test` still has the value sin. test <- sin environment(test)$test <- cos test(0) ## [1] 0 It appears to be related to the double use of `test` in `$<-` since if we break it up it works as expected:

[Rd] aggregate.formula and pipes

2022-01-26 Thread Gabor Grothendieck
Because aggregate.formula has a formula argument but the generic has an x argument neither of these work: mtcars |> aggregate(x = mpg ~ cyl, FUN = mean) mtcars |> aggregate(formula = mpg ~ cyl, FUN = mean) This does work: mtcars |> stats:::aggregate.formula(formula = mpg ~ cyl, FUN = mean)

[Rd] pipes and setNames

2022-04-17 Thread Gabor Grothendieck
When trying to transform names in a pipeline one can do the following where for this example we are making names upper case. BOD |> (\(x) setNames(x, toupper(names(x() but that seems a bit ugly and verbose. 1. One possibility is to enhance setNames to allow a function as a second argument.

[Rd] anova and intercept

2022-12-26 Thread Gabor Grothendieck
Suppose we want to perform a paired test using the sleep data frame with anova in R. Then this works and gives the same p value as t.test(extra ~ group, sleep, paired = TRUE, var.equal = TRUE) ones <- rep(1, 10) anova(lm(diff(extra, 10) ~ ones + 0, sleep) This gives output but does not giv

Re: [Rd] anova and intercept

2022-12-27 Thread Gabor Grothendieck
fit1, ~ -1) > anova(fit0, fit1) > > -pd > > > On 26 Dec 2022, at 13:49 , Gabor Grothendieck > > wrote: > > > > Suppose we want to perform a paired test using the sleep data frame > > with anova in R. Then this works and gives the same p value as > >

[Rd] package.skeleton hello* files

2023-02-14 Thread Gabor Grothendieck
Is there some way to avoid the automatic generation of hello* files in package.skeleton? I found that the following does it on Windows but then it does not create an R directory which I still want and also it gives warnings which I don't want. package.skeleton(code_files = "NUL") -- Statistics &

[Rd] summary.lm fails for difftime objects

2023-02-18 Thread Gabor Grothendieck
lm works with difftime objects but then if you try to get the summary it fails with an error: fit <- lm(as.difftime(Time, units = "mins") ~ demand, BOD) summary(fit) ## Error in Ops.difftime((f - mean(f)), 2) : ## '^' not defined for "difftime" objects A number of other lm methods also f

Re: [Rd] Augment base::replace(x, list, value) to allow list= to be a predicate?

2023-03-07 Thread Gabor Grothendieck
This could be extended to sub and gsub as well which gsubfn in the gusbfn package already does: library(gsubfn) gsubfn("^..", toupper, c("abc", "xyz")) ## [1] "ABc" "XYz" On Fri, Mar 3, 2023 at 7:22 PM Pavel Krivitsky wrote: > > Dear All, > > Currently, list= in base::replace(x, list, valu

Re: [Rd] Augment base::replace(x, list, value) to allow list= to be a predicate?

2023-03-08 Thread Gabor Grothendieck
ES = FALSE) > } > > gsub("^..", toupper, c("abc", "xyz")) > [1] "ABc" "XYz" > > But this isn't a simple change to replace() anymore, and I may just be > spending too much time tinkering with Julia. > > Steve > > On

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-13 Thread Gabor Grothendieck
The gsubfn package can do that. library(gsubfn) # swap a and b without explicitly creating a temporary a <- 1; b <- 2 list[a,b] <- list(b,a) # get eigenvectors and eigenvalues list[eval, evec] <- eigen(cbind(1,1:3,3:1)) # get today's month, day, year requir

[Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
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. a1 <- `rownames<-`(anscombe[1:3, ], NULL) a2 <- anscombe[1:3, ] ix <- 5:8 # input arguments to are identical in both cases identical(stack(a1[ix]), sta

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
t; [1] 3 > > Best, > -Deepayan > > On Tue, 14 Nov 2023 at 08:23, Gabor Grothendieck > 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. > > > > a

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
Also why should that difference result in different behavior? On Tue, Nov 14, 2023 at 9:38 AM Gabor Grothendieck 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 Sarka

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
Seems like a leaky abstraction. If both representations are supposed to be outwardly the same to the user then they should act the same and if not then identical should not be TRUE. On Tue, Nov 14, 2023 at 9:56 AM Deepayan Sarkar wrote: > > On Tue, 14 Nov 2023 at 09:41, Gabor Grothe

Re: [Rd] eval(parse()) within mutate() returning same value for all rows

2023-12-29 Thread Gabor Grothendieck
If the question is how to accomplish this as opposed to how to use eval then we can do it without eval like this provided we can assume that words contains three %s . library(dplyr) library(tidyr) df <- tibble(words=c("%s plus %s equals %s"),args=c("1,1,2","2,2,4","3,3,6")) df |> sepa

Re: [Rd] eval(parse()) within mutate() returning same value for all rows

2023-12-30 Thread Gabor Grothendieck
args1 args2 args3 combined ## ## 1 %s plus %s equals %s 1 1 2 1 plus 1 equals 2 ## 2 %s plus %s equals %s 2 2 4 2 plus 2 equals 4 ## 3 %s plus %s equals %s 3 3 6 3 plus 3 equals 6 On Fri, Dec 29, 2023 at 1:45 PM Gabor Grothendieck wro

Re: [Rd] capture "->"

2024-03-02 Thread Gabor Grothendieck
Would it be good enough to pass it as a formula? Using your definition of foo foo(~ A -> result) ## result <- ~A foo(~ result <- A) ## ~result <- A On Fri, Mar 1, 2024 at 4:18 AM Dmitri Popavenko wrote: > > Hi everyone, > > I am aware this is a parser issue, but is there any possibilit

Re: [Rd] head.ts, tail.ts loses time

2024-06-09 Thread Gabor Grothendieck
zoo overcomes many of the limitations of ts: library(zoo) as.ts(head(as.zoo(presidents))) ## Qtr1 Qtr2 Qtr3 Qtr4 ## 1945 NA 87 82 75 ## 1946 63 50 xts also works here. On Sun, Jun 9, 2024 at 12:04 PM Spencer Graves wrote: > > Hello, All: > > > The 'head' and

Re: [Rd] head.ts, tail.ts loses time

2024-06-11 Thread Gabor Grothendieck
ies > > I think I'd consider using windows() for a head.ts() and tail.ts(), > but in any case, I am sympathetic adding such methods to "base R"'s > utils package. > > > Martin > > > Best Wishes, Spencer Graves > > >

[Rd] transform

2024-08-24 Thread Gabor Grothendieck
One oddity in transform that I recently noticed. It seems that to include a one-column data frame in the arguments one must name it even though the name is ignored. If the data frame has more than one column then it must also be named but in that case it is not ignored and the names are made up o

Re: [Rd] transform

2024-08-27 Thread Gabor Grothendieck
.z > 141 190 7.4 67 5 1 -0.9250228 0.46483406 > 236 118 8.0 72 5 2 -0.5035793 0.28822668 > ... > > On the whole, I think that transform was never designed (nor documented) to > take data frame arguments, so caveat emptor. > > - Peter >

[Rd] Inconsistency between row and nrow

2024-09-08 Thread Gabor Grothendieck
In the following nrow provides the expected result but row gives an error. I would have thought that they would both work or both fail. aa <- array(dim = 5:3) nrow(aa) ## [1] 5 row(aa) ## Error in row(aa) : a matrix-like object is required as argument to 'row' # this does work: s

Re: [Rd] Inconsistency between row and nrow

2024-09-08 Thread Gabor Grothendieck
when x is a matrix." > > further differentiating the behavior of row() and col() as more specific > implementations in the 2-dimensional case. > > To my read then, the difference in behavior appears to be intentional and > expected. > > Regards, > > Marc Schwart

Re: [Rd] transform

2024-09-08 Thread Gabor Grothendieck
reas (the wisdom of this escapes me) > > > >> data.frame(head(airquality), y=data.frame(x=rnorm(6),z=rnorm(6))) > >Ozone Solar.R Wind Temp Month Dayy.x y.z > > 141 190 7.4 67 5 1 -0.9250228 0.46483406 > > 236 118 8.0

[Rd] findInterval

2024-09-16 Thread Gabor Grothendieck
Suppose we have `dat` shown below and we want to find the the `y` value corresponding to the last value in `x` equal to the corresponding component of `seek` and we wish to return an output the same length as `seek` using `findInterval` to perform the search. This returns the correct result: d

Re: [Rd] findInterval

2024-09-17 Thread Gabor Grothendieck
s the base of R now has pipes. On Tue, Sep 17, 2024 at 12:14 PM Martin Maechler wrote: > > >>>>> Gabor Grothendieck > >>>>> on Mon, 16 Sep 2024 11:21:55 -0400 writes: > > > Suppose we have `dat` shown below and we want to find the the `y` val

Re: [Rd] Redirect system2 stdout to a file on windows

2013-07-14 Thread Gabor Grothendieck
On Sun, Jul 14, 2013 at 1:18 PM, Jeroen Ooms wrote: > According to the manual, the `stdout` argument of the `system2` > function can redirect output to a file. This seems to work on unix, > however I can't get it to work on windows. The toy example below, no > `out.txt` or `err.txt` files are crea

Re: [Rd] Redirect system2 stdout to a file on windows

2013-07-14 Thread Gabor Grothendieck
On Sun, Jul 14, 2013 at 5:20 PM, Jeroen Ooms wrote: > On Sun, Jul 14, 2013 at 10:24 PM, Gabor Grothendieck wrote: >> Try: >> out.txt <- normalizePath("./out.txt", mustWork = FALSE) > > Doesn't work either, neither on Win7 nor WinXP. > >> session

Re: [Rd] Extending suggestion for stopifnot

2013-08-20 Thread Gabor Grothendieck
On Tue, Aug 20, 2013 at 6:00 PM, ivo welch wrote: > character string at the end of an existing function, stopifnot(). (2) > I think "estrings" (that behave like characters but are interpolated > before printout) are useful in the same way perl interpolated strings > are useful. The gsubfn packag

Re: [Rd] legitimate use of :::

2013-08-22 Thread Gabor Grothendieck
If ::: is disallowed then its likely that package developers will need to export more functions to satisfy the consumers of those otherwise hidden functions but if more functions are exported then there will be a greater likelihood of conflicts among packages. The problem seems to be that there ar

Re: [Rd] legitimate use of :::

2013-08-22 Thread Gabor Grothendieck
gt; > > > Exactly, the corresponding NAMESPACE directive is > > importFrom() > > and it should be used. > > > >> On Aug 22, 2013, at 6:27 PM, Gabor Grothendieck >> wrote: >> >>> If ::: is disallowed then its likely that package developers will need >

Re: [Rd] legitimate use of :::

2013-08-22 Thread Gabor Grothendieck
On Thu, Aug 22, 2013 at 7:57 PM, Gabriel Becker wrote: > My understanding is that lookup happens in the imports before moving on to > the search path, so if I understand you correctly I don't think that is an > issue. If A also *exported* f, that would be a problem... > A can only import f from

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Gabor Grothendieck
On Sun, Oct 20, 2013 at 4:49 PM, Duncan Murdoch wrote: > On 13-10-20 4:43 PM, Jonathan Greenberg wrote: >> >> I'm working on an update for my CRAN package "spatial.tools" and I noticed >> a new warning when running R CMD CHECK --as-cran: >> >> * checking CRAN incoming feasibility ... NOTE >> Maint

Re: [Rd] Multivariate time series in R 3 vs R 2

2013-10-26 Thread Gabor Grothendieck
On Wed, Oct 23, 2013 at 2:56 PM, Андрей Парамонов wrote: > Hello! > > Recently I got report that my package mar1s doesn't pass checks any more on > R 3.0.2. I started to investigate and found the following difference in > multivariate time series handling in R 3.0.2 compared to R 2 (I've checked >

Re: [Rd] Huge performance difference between implicit and explicit print

2013-10-30 Thread Gabor Grothendieck
On Wed, Oct 30, 2013 at 6:22 PM, Hadley Wickham wrote: > Hi all, > > Can anyone help me understand why an implicit print (i.e. just typing > df at the console), is so much slower than an explicit print (i.e. > print(df)) in the example below? I see the difference in both Rstudio > and in a termin

Re: [Rd] Depending/Importing data only packages

2013-12-07 Thread Gabor Grothendieck
On Sat, Dec 7, 2013 at 1:35 PM, Paul Gilbert wrote: > > > On 13-12-07 12:19 PM, Gábor Csárdi wrote: >> >> I don't know about this particular case, but in general it makes sense >> to rely on a data package. E.g. I am creating a package that does >> Bayesian inference for a particular problem, pote

Re: [Rd] In-string variable/symbol substitution: What formats/syntax is out there?

2013-12-17 Thread Gabor Grothendieck
On Tue, Dec 17, 2013 at 4:44 PM, Henrik Bengtsson wrote: > Hi, > > I'm try to collect a list of methods/packages available in R for doing > in-string variable/symbol substitution, e.g. someFcn("pi=${pi}"), > anotherFcn("pi=@pi@") and so on becomes "pi=3.141593". I am aware of > the following: > >

[Rd] file.exists does not like path names ending in /

2014-01-16 Thread Gabor Grothendieck
If a path name ends in slash then file.exists says it does not exist. I would have expected these to all return TRUE. > file.exists("/Program Files") [1] TRUE > file.exists("/Program Files/") [1] FALSE > file.exists(normalizePath("/Program Files/")) [1] FALSE > R.version.string [1] "R version 3.0.

[Rd] win.version() incorrect

2014-01-16 Thread Gabor Grothendieck
On Windows 8.1 I get this. win.version() indicates build 9200 but I actually have build 9600 as can be seen from the ver command. shell("winver") also indicates 9600. I assume ver and winver are correct and win.version() is not. > win.version() [1] "Windows 8 x64 (build 9200)" > shell("ver") M

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Gabor Grothendieck
On Fri, Jan 17, 2014 at 6:16 AM, Martin Maechler wrote: >>>>>> Gabor Grothendieck >>>>>> on Fri, 17 Jan 2014 00:10:43 -0500 writes: > > > If a path name ends in slash then file.exists says it does > > not exist. I w

Re: [Rd] R 3.1.0 and C++11

2014-04-10 Thread Gabor Grothendieck
On Tue, Oct 29, 2013 at 1:58 AM, wrote: > Le 2013-10-29 03:01, Whit Armstrong a écrit : > >> I would love to see optional c++0x support added for R. > > > c++0x was the name given for when this was in development. Now c++11 is a > published standard backed by implementations by major compilers. >

Re: [Rd] type.convert and doubles

2014-04-17 Thread Gabor Grothendieck
On Thu, Apr 17, 2014 at 2:21 PM, Murray Stokely wrote: > If you later want to do arithmetic on them, you can choose to lose > precision by using as.numeric() or use one of the large number > packages on CRAN (GMP, int64, bit64, etc.). But once you've dropped > the precision with as.numeric you ca

Re: [Rd] Can the output of Sys.getenv() be improved?

2014-04-18 Thread Gabor Grothendieck
On Fri, Apr 18, 2014 at 12:38 PM, Zhang,Jun wrote: > Within an R session, type Sys.getenv() will list all the environment > variables, but each one of them occupies about a page, so scrolling to find > one is difficult. Is this because I don't know how to use it or something > could be improved

Re: [Rd] type.convert and doubles

2014-04-19 Thread Gabor Grothendieck
On Sat, Apr 19, 2014 at 1:06 PM, Simon Urbanek wrote: > On Apr 19, 2014, at 9:00 AM, Martin Maechler > wrote: > > I think there should be two separate discussions: > > a) have an option (argument to type.convert and possibly read.table) to > enable/disable this behavior. I'm strongly in favor o

[Rd] useDynLib

2014-07-06 Thread Gabor Grothendieck
I would like to be able to load two versions of a package at once and to do that was thinking of giving each version a different package name in the DESCRIPTION file and the building and installing each such version separately. library(myPkg1) library(myPkg2) and then use myPkg1::myFun() and myPk

Re: [Rd] Licence for datasets in a R-package

2014-07-21 Thread Gabor Grothendieck
On Mon, Jul 21, 2014 at 12:54 PM, Gábor Csárdi wrote: > In practice, CRAN maintainers do not allow multiple licenses for parts > of the same package. At least they did not for my package a couple of > months ago. > If that is the case then you could put your data files in a separate package from

Re: [Rd] Re R CMD check checking in development version of R

2014-08-28 Thread Gabor Grothendieck
Yes, Depends certainly has a role. The ability of one package to automatically provide all the facilities of another package to the user is important. There are many situations where the functionality you want to provide to the user is split among multiple packages. For example, 1. xts uses zoo a

Re: [Rd] Using Rtools with gcc 4.8.3

2014-10-05 Thread Gabor Grothendieck
On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges wrote: > > > On 05.10.2014 12:20, Jeroen Ooms wrote: >> >> I started working on some R bindings for mongo-c-driver [1]. The C >> library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), >> however on my windows machine (gcc 4.6.3 from Rtools 3.

Re: [Rd] Options that are local to the package that sets them

2014-10-31 Thread Gabor Grothendieck
On Fri, Oct 31, 2014 at 7:34 PM, Gábor Csárdi wrote: > Dear All, > > I am trying to do the following, and could use some hints. > > Suppose I have a package called pkgA. pkgA exposes an API that > includes setting some options, e.g. pkgA works with color palettes, > and the user of the package can

Re: [Rd] Options that are local to the package that sets them

2014-10-31 Thread Gabor Grothendieck
On Fri, Oct 31, 2014 at 8:43 PM, Gábor Csárdi wrote: > On Fri, Oct 31, 2014 at 8:10 PM, Gabor Grothendieck > wrote: > [...] >>> Is there a better way? I have a feeling that this is already supported >>> somehow, I just can't find out how. >>> >>

Re: [Rd] CRAN and ggplot2 geom and stat extensions

2014-12-23 Thread Gabor Grothendieck
On Tue, Dec 23, 2014 at 11:21 AM, Ista Zahn wrote: > On Tue, Dec 23, 2014 at 10:34 AM, Frank Harrell > wrote: >> I am thinking about adding several geom and stat extensions to ggplot2 >> in the Hmisc package. To do this requires using non-exported ggplot2 >> functions as discussed in >> http://s

Re: [Rd] xtabs and NA

2015-02-09 Thread Gabor Grothendieck
On Mon, Feb 9, 2015 at 8:52 AM, Kirill Müller wrote: > Hi > > > I haven't found a way to produce a tabulation from factor data with NA > values using xtabs. Please find a minimal example below, it's also on R-pubs > [1]. Tested with R 3.1.2 and R-devel r67720. > > It doesn't seem to be documented

[Rd] returnValue()

2015-05-22 Thread Gabor Grothendieck
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 ov

Re: [Rd] returnValue()

2015-05-22 Thread Gabor Grothendieck
Please disregard. I was running an older version of R at the time. In R version 3.2.0 Patched (2015-04-19 r68205) returnValue() does work. On Fri, May 22, 2015 at 6:25 PM, Gabor Grothendieck wrote: > In R devel rev.66393 (2014-08-15) it was possible to do this: > >trace(optim, exi

Re: [Rd] Error message library()

2011-10-27 Thread Gabor Grothendieck
On Wed, Oct 26, 2011 at 5:46 AM, ONKELINX, Thierry wrote: > Dear all, > > When one tries to load a non-installed package you get the error: > > Error in library(xyz) : there is no package called 'xyz' > > I noticed on several occasions that this puzzles beginners. Therefore I > suggest to change

Re: [Rd] Error message library()

2011-10-27 Thread Gabor Grothendieck
On Thu, Oct 27, 2011 at 2:10 PM, Milan Bouchet-Valat wrote: > Le jeudi 27 octobre 2011 à 13:45 -0400, Gabor Grothendieck a écrit : >> Perhaps it could report where it looked and couldn't find it: >> >> There is no package called 'xyz' in "C:/R/win-library

Re: [Rd] Error message library()

2011-10-28 Thread Gabor Grothendieck
On Fri, Oct 28, 2011 at 6:49 AM, Renaud Gaujoux wrote: > "BTW: an ever more intuitive solution (IMHO) would be to auto-complete > package names in library( ... Deepayan?;)  That is non-intrusive and in line > with the general use of R." (Simon) > > This is indeed a long wanted feature and to my su

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > I think many people like to help, but we cannot: > > You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that > version of R, it does not have a NAMESPACE in the end? > Then > >  - your R installation is broken or >  - you are looking into a library wher

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
On Tue, Nov 8, 2011 at 10:31 AM, Gabor Grothendieck wrote: > 2011/11/8 Uwe Ligges : >> I think many people like to help, but we cannot: >> >> You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that >> version of R, it does not have a NA

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 16:31, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> I think many people like to help, but we cannot: >>> >>> You say you are under R-2.14.0 and whn you R CMD INSTALL a package wit

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 17:04, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 16:31, Gabor Grothendieck wrote: >>>> >>>> 2011/11/8 Uwe Ligges: >>>>> >>&g

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 17:56, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 17:04, Gabor Grothendieck wrote: >>>> >>>> 2011/11/8 Uwe Ligges: >>>>> >&g

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-09 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 19:08, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 17:56, Gabor Grothendieck wrote: >>>> >>>> 2011/11/8 Uwe Ligges: >>>>> >&g

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-09 Thread Gabor Grothendieck
2011/11/9 Uwe Ligges : > > > On 09.11.2011 13:52, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 19:08, Gabor Grothendieck wrote: >>>> >>>> 2011/11/8 Uwe Ligges: >>>>> >&g

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-09 Thread Gabor Grothendieck
2011/11/9 Uwe Ligges : >>> >>> Honestly, that (svn revision) is the only part that we do not have on the >>> front pages but they are given in the log files. >> >> The R version is not on the package's CRAN page, e.g. >> http://cran.r-project.org/web/packages/sqldf/index.html  I was >> thinking of

Re: [Rd] One step way to create data frame with variable "variable names"?

2011-11-11 Thread Gabor Grothendieck
On Fri, Nov 11, 2011 at 10:25 AM, Paul Johnson wrote: > Suppose > > plotx <- "someName" > modx <- "otherName" > plotxRange <- c(10,20) > modxVals <- c(1,2,3) > > It often happens I want to create a dataframe or object with plotx or > modx as the variable names.  But can't understand syntax to do t

Re: [Rd] extending the colClasses argument in read.table

2011-11-21 Thread Gabor Grothendieck
2011/11/21 Romain François : > Hello, > > We've released the int64 package to CRAN a few days ago. The package > provides S4 classes "int64" and "uint64" that represent signed and unsigned > 64 bit integer vectors. > > One further development of the package is to facilitate reading 64 bit > integer

Re: [Rd] How to deal with package conflicts

2011-11-25 Thread Gabor Grothendieck
On Fri, Nov 25, 2011 at 10:37 AM, Terry Therneau wrote: > > On Fri, 2011-11-25 at 09:50 -0500, Duncan Murdoch wrote: >> I think the general idea in formulas is that it is up to the user to >> define the meaning of functions used in them.  Normally the user has >> attached the package that is worki

[Rd] Standardizing included packages

2011-11-30 Thread Gabor Grothendieck
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

Re: [Rd] CRAN link broken

2011-12-30 Thread Gabor Grothendieck
On Fri, Dec 30, 2011 at 4:32 PM, Paul Gilbert wrote: > The packages link on CRAN (http://cran.at.r-project.org/)  seems to be > broken. > > Paul > >     Object not found! >    The requested URL was not found on this server. The link on the >    referring page

Re: [Rd] need gui matrix editor: does R Core team have advice on how?

2012-01-28 Thread Gabor Grothendieck
On Sat, Jan 28, 2012 at 2:59 PM, Paul Johnson wrote: > Dear R-devel: > > Would R core team consider endorsing a graphical toolkit and trying to > facilitate development of little GUI tools? > > I need a gui matrix editor for users that want to be able to write > matrices that are later used to sim

Re: [Rd] tcltk GUIs (was need gui matrix editor: does R Core team have advice on how?)

2012-01-29 Thread Gabor Grothendieck
On Sun, Jan 29, 2012 at 7:10 AM, Prof Brian Ripley wrote: > On 28/01/2012 22:04, John Fox wrote: >> >> Dear Paul and Gabor, >> >> The Rcmdr GUI uses the tcltk package, so I have some experience with >> providing an R tcltk-based GUI for various platforms. >> >> As Gabor says, everything works very

Re: [Rd] hash table clean-up

2012-03-04 Thread Gabor Grothendieck
On Sun, Mar 4, 2012 at 4:19 PM, wrote: > On Sun, 4 Mar 2012, Florent D. wrote: > >> Hello, >> >> I have noticed that the memory usage inside an R session increases as >> more and more objects with unique names are created, even after they >> are removed. Here is a small reproducible example: >> >

Re: [Rd] Why is there no within.environment function?

2012-03-21 Thread Gabor Grothendieck
On Wed, Mar 21, 2012 at 5:51 PM, Richard Cotton wrote: > If I want to assign some variables into an environment, it seems > natural to do something like > > e <- new.env() > within(e, >    { >      x <- 1:5 >      y <- runif(5) >    } > ) > > This throws an error, since within.environment doesn't

Re: [Rd] CRAN policies

2012-03-27 Thread Gabor Grothendieck
On Tue, Mar 27, 2012 at 7:52 AM, Prof Brian Ripley wrote: > CRAN has for some time had a policies page at > http://cran.r-project.org/web/packages/policies.html > and we would like to draw this to the attention of package maintainers.  In > particular, please > > - always send a submission email t

Re: [Rd] CRAN policies

2012-03-27 Thread Gabor Grothendieck
2012/3/27 Uwe Ligges : > > > On 27.03.2012 17:09, Gabor Grothendieck wrote: >> >> On Tue, Mar 27, 2012 at 7:52 AM, Prof Brian Ripley >>  wrote: >>> >>> CRAN has for some time had a policies page at >>> http://cran.r-project.org/web/packages/p

Re: [Rd] CRAN policies

2012-03-27 Thread Gabor Grothendieck
2012/3/27 Uwe Ligges : > > > On 27.03.2012 19:10, Jeffrey Ryan wrote: >> >> Is there a distinction as to NOTE vs. WARNING that is documented?  I've >> always assumed (wrongly?) that NOTES weren't an issue with publishing on >> CRAN, but that they may change to WARNINGS at some point. > > > We won't

Re: [Rd] CRAN policies

2012-03-28 Thread Gabor Grothendieck
2012/3/28 Uwe Ligges : > > > On 27.03.2012 20:33, Jeffrey Ryan wrote: >> >> Thanks Uwe for the clarification on what goes and what stays. >> >> Still fuzzy on the notion of "significant" though.  Do you have an example >> or two for the list? > > > > We have to look at those notes again and again i

Re: [Rd] CRAN policies

2012-03-29 Thread Gabor Grothendieck
On Wed, Mar 28, 2012 at 11:52 PM, Thomas Lumley wrote: > On Thu, Mar 29, 2012 at 3:30 AM, Gabor Grothendieck > wrote: >> 2012/3/28 Uwe Ligges : >>> >>> >>> On 27.03.2012 20:33, Jeffrey Ryan wrote: >>>> >>>> Thanks Uwe for the clar

Re: [Rd] CRAN policies

2012-03-31 Thread Gabor Grothendieck
On Sat, Mar 31, 2012 at 9:57 AM, Paul Gilbert wrote: > Mark > > I would like to clarify two specific points. > > On 12-03-31 04:41 AM, mark.braving...@csiro.au wrote: >> ... > >> Someone has subsequently decided that code should look a certain way, and >> has added a check that >> isn't in the lan

[Rd] Problem with args

2012-04-21 Thread Gabor Grothendieck
args ought to check that its argument is a function: > max <- 3 > args(max) NULL e.g. > args <- function(name) { + name <- match.fun(name) + base::args(name) + } > args(max) function (..., na.rm = FALSE) NULL -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-87

Re: [Rd] Problem with args

2012-04-21 Thread Gabor Grothendieck
On Sat, Apr 21, 2012 at 1:38 PM, Simon Urbanek wrote: > > On Apr 21, 2012, at 1:03 PM, Gabor Grothendieck wrote: > >> args ought to check that its argument is a function: >> >>> max <- 3 >>> args(max) >> NULL >> >> e.g. >

Re: [Rd] Problem with args

2012-04-21 Thread Gabor Grothendieck
On Sat, Apr 21, 2012 at 2:10 PM, Simon Urbanek wrote: > > On Apr 21, 2012, at 1:45 PM, Gabor Grothendieck wrote: > >> On Sat, Apr 21, 2012 at 1:38 PM, Simon Urbanek >> wrote: >>> >>> On Apr 21, 2012, at 1:03 PM, Gabor Grothendieck wrote: >>>

Re: [Rd] loading multiple CSV files into a single data frame

2012-05-03 Thread Gabor Grothendieck
On Thu, May 3, 2012 at 2:07 PM, victor jimenez wrote: > Sometimes I have hundreds of CSV files scattered in a directory tree, > resulting from experiments' executions. For instance, giving an example > from my field, I may want to collect the performance of a processor for > several design paramet

Re: [Rd] Best way to locate R executable from within R?

2012-05-22 Thread Gabor Grothendieck
On Tue, May 22, 2012 at 1:34 PM, Henrik Bengtsson wrote: > Hi, > > I'd like to spawn of a new R process from within R using system(), > e.g. system("R -f myScript.R").  However, just specifying "R" as in > that example is not guaranteed to work, because "R" may not be on the > OS's search path. >

Re: [Rd] Best way to locate R executable from within R?

2012-05-22 Thread Gabor Grothendieck
On Tue, May 22, 2012 at 3:05 PM, Henrik Bengtsson wrote: > On Tue, May 22, 2012 at 11:39 AM, Gabor Grothendieck > wrote: >> On Tue, May 22, 2012 at 1:34 PM, Henrik Bengtsson >> wrote: >>> Hi, >>> >>> I'd like to spawn of a new R process f

Re: [Rd] Best way to locate R executable from within R?

2012-05-22 Thread Gabor Grothendieck
On Tue, May 22, 2012 at 3:28 PM, Gabor Grothendieck wrote: > On Tue, May 22, 2012 at 3:05 PM, Henrik Bengtsson > wrote: >> On Tue, May 22, 2012 at 11:39 AM, Gabor Grothendieck >> wrote: >>> On Tue, May 22, 2012 at 1:34 PM, Henrik Bengtsson >>> wrote: >&

Re: [Rd] Best way to locate R executable from within R?

2012-05-22 Thread Gabor Grothendieck
On Tue, May 22, 2012 at 6:04 PM, Simon Urbanek wrote: > > On May 22, 2012, at 3:34 PM, Gabor Grothendieck wrote: > >> On Tue, May 22, 2012 at 3:28 PM, Gabor Grothendieck >> wrote: >>> On Tue, May 22, 2012 at 3:05 PM, Henrik Bengtsson >>> wrote: >&

Re: [Rd] Best way to locate R executable from within R?

2012-05-22 Thread Gabor Grothendieck
On Tue, May 22, 2012 at 7:50 PM, Simon Urbanek wrote: > > On May 22, 2012, at 7:37 PM, Gabor Grothendieck wrote: > >> On Tue, May 22, 2012 at 6:04 PM, Simon Urbanek >> wrote: >>> >>> On May 22, 2012, at 3:34 PM, Gabor Grothendieck wrote: >>

Re: [Rd] Curry: proposed new functional programming, er, function.

2012-05-26 Thread Gabor Grothendieck
On Sat, May 26, 2012 at 12:30 PM, Yike Lu wrote: > On 5/25/12 5:23 PM, Hadley Wickham wrote: >> >> On Fri, May 25, 2012 at 3:14 PM, Yike Lu  wrote: >>> >>> So here's the way I'm reading this: >>> >>> Original: >>> curry_call is the function body you're constructing, which is itself just >>> a >>>

Re: [Rd] extractAIC.nls

2012-07-14 Thread Gabor Grothendieck
On Sat, Jul 14, 2012 at 6:53 PM, Spencer Graves wrote: > Hello: > > > Does "extractAIC.nls" exist anywhere? If no, is there some reason it > should not be used? > > > I'm planning to add it to the fda package, but before I do, I felt a > need to ask if there is some reason I shouldn't

Re: [Rd] extractAIC.nls

2012-07-14 Thread Gabor Grothendieck
On Sat, Jul 14, 2012 at 8:48 PM, Spencer Graves wrote: > On 7/14/2012 4:11 PM, Gabor Grothendieck wrote: >> >> On Sat, Jul 14, 2012 at 6:53 PM, Spencer Graves >> wrote: >>> >>> Hello: >>> >>> >>>Does "extractAIC.nls

Re: [Rd] Finding dynamic shared libraries loaded with a package

2012-07-23 Thread Gabor Grothendieck
On Mon, Jul 23, 2012 at 8:29 PM, Winston Chang wrote: > Is there a way to query a package to see what dynamic shared libraries are > loaded with it? > This gives a "DLLInfoList" class object whose components are info associated with the loaded dll's DLLInfoList <- library.dynam() and this gives

[Rd] rep fails on pairlist

2012-07-26 Thread Gabor Grothendieck
This code which has worked for years in R but fails under R-devel: > R.version.string [1] "R Under development (unstable) (2012-07-25 r59963)" > > n <- 3 > f <- function(x) {} > formals(f) <- rep(formals(f), n) ## Error in rep(formals(f), n) : replication of pairlists is defunct The message sugge

Re: [Rd] rep fails on pairlist

2012-07-26 Thread Gabor Grothendieck
On Thu, Jul 26, 2012 at 4:24 PM, Dirk Eddelbuettel wrote: > > On 26 July 2012 at 15:55, Gabor Grothendieck wrote: > | This code which has worked for years in R but fails under R-devel: > | > | > R.version.string > | [1] "R Under development (unstable) (2012-07-25 r

Re: [Rd] rep fails on pairlist

2012-07-26 Thread Gabor Grothendieck
On Thu, Jul 26, 2012 at 7:29 PM, Duncan Murdoch wrote: > On 12-07-26 3:55 PM, Gabor Grothendieck wrote: >> >> This code which has worked for years in R but fails under R-devel: >> >>> R.version.string >> >> [1] "R Under development (unstable

[Rd] tcltk capability

2012-08-30 Thread Gabor Grothendieck
There are quite a few packages that make use of tcltk and although - most R distributions have tcltk capability - its possible to query this via capabilities()[["tcltk"]] - attempting to build a package that needs it on such an R distribution will give a message letting one know users still seem

Re: [Rd] tcltk capability

2012-09-27 Thread Gabor Grothendieck
On Thu, Sep 27, 2012 at 2:18 PM, Paul Johnson wrote: > Sorry I did not see this sooner. Response below: > > On Thu, Aug 30, 2012 at 2:48 PM, Gabor Grothendieck > wrote: >> There are quite a few packages that make use of tcltk and although >> >> - most R distr

<    1   2   3   4   5   6   7   8   9   10   >