Re: [Rd] [External] Re: capture "->"

2024-03-04 Thread Bill Dunlap
Maybe someone has already suggested this, but if your functions accepted strings you could use sub or gsub to replace the -> with a symbol that parsed at the same precedence as <-, say <<-. Then parse it and deal with it. When it is time to display the parsed and perhaps manipulated formulae to

Re: [Rd] Difficult debug

2024-02-07 Thread Bill Dunlap
nt on Rf_error or something in your code, and 'cont' or 'continue' to resume running R. You can get information about the status and history of a memory location, say 0x12345678, with (gdb) monitor vinfo location 0x12345678 More information is in https://valgrind.org/docs/manual/manual-core-adv.h

Re: [Rd] Difficult debug

2024-02-07 Thread Bill Dunlap
I haven't done any R memory debugging lately, but https://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/msg10289.html shows how I used to have gdb break where valgrind finds a problem so you could examine the details. Also, running your code after running gctorture(TRUE) can help

Re: [Rd] capture error messages from loading shared objects

2023-11-28 Thread Bill Dunlap
If you would like to save the error message instead of suppressing it, you can use tryCatch(message=function(e)e, ...). -BIll On Tue, Nov 28, 2023 at 3:55 AM Adrian Dusa wrote: > Once again, Ivan, many thanks. > Yes, that does solve it. > Best wishes, > Adrian > > On Tue, Nov 28, 2023 at 11:28 

Re: [Rd] Concerns with SVD -- and the Matrix Exponential

2023-08-16 Thread Bill Dunlap
You wrote: Using singular value decomposition, any second-order tensor is given as A = UΣVt where U and V are the orthogonal tensors, and Σ is the diagonal matrix (Eigenvalue matrix). For a symmetric matrix, the orthogonal tensors are the same, i.e., U=V.

Re: [Rd] New behavior when running script in package directory?

2023-06-21 Thread Bill Dunlap
If ./Rprofile is not present and ~/.Rprofile is present then R will run the latter at startup. Do you have a ~/.Rprofile that defines a ss() function? -Bill On Wed, Jun 21, 2023 at 8:50 AM Dominick Samperi wrote: > Thanks, I checked for .Rprofile and .RData files. They are not present. > I

Re: [R-pkg-devel] Inconsistent functionality of c++ code in MatchIt

2023-05-11 Thread Bill Dunlap
I see the problem when I compile the C++ code on Ubuntu 20.04 and the latest R-devel with C++ compiler: ‘g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 If I change all the unadorned 'abs' calls in src/nn_matchC_vec.cpp with the prefix 'std::' the problem goes away. -Bill On Thu, May 11, 2023 at

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-05-11 Thread Bill Dunlap
> What do others think? I can imagine a class, "TemperatureKelvins", that wraps a double but would have a range of 0 to Inf or one called "GymnasticsScore" with a range of 0 to 10. For those sorts of things it would be nice to have a generic that gave the possible min and max for the class

Re: [Rd] xyTable(x,y) versus table(x,y) with NAs

2023-04-25 Thread Bill Dunlap
x <- c(1, 1, 2, 2, 2, 3) y <- c(1, 2, 1, 3, NA, 3) > str(xyTable(x,y)) List of 3 $ x : num [1:6] 1 1 2 2 NA 3 $ y : num [1:6] 1 2 1 3 NA 3 $ number: int [1:6] 1 1 1 NA NA 1 How many (2,3)s do we have? At least one, the third entry, but the fourth entry, (2,NA), is possibly a (2,3)

Re: [Rd] WISH: Optional mechanism preventing var <<- value from assigning non-existing variable

2023-03-19 Thread Bill Dunlap
Why should it make an exception for cases where the about-to-be-assigned-to name is present in the global environment? I think it should warn or give an error if the altered variable is in any environment on the search list. -Bill On Sun, Mar 19, 2023 at 10:54 AM Duncan Murdoch wrote: > I

Re: [Rd] tab-complete for non-syntactic names could attempt backtick-wrapping

2023-03-02 Thread Bill Dunlap
x$`string` is not the same as x$'string'. They may act similarly now, but they do not parse the same. > vapply(as.list(quote(list$`component`)), typeof, "") [1] "symbol" "symbol" "symbol" > vapply(as.list(quote(list$"component")), typeof, "") [1] "symbol""symbol""character" >

Re: [R-pkg-devel] reproducing cran warnings

2023-02-03 Thread Bill Dunlap
checking whether package ‘epanet2toolkit’ can be installed ... WARNING Found the following significant warnings: report.c:1466:37: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

Re: [Rd] Potential bug in fitted.nls

2023-01-26 Thread Bill Dunlap
Doesn't nls() expect that the lengths of vectors on both sides of the formula match (if both are supplied)? Perhaps it should check for that. -Bill On Thu, Jan 26, 2023 at 12:17 AM Dave Armstrong wrote: > Dear Colleagues, > > I recently answered [this question]() on StackOverflow that

Re: [R-pkg-devel] replacements of sprintf in compiled code

2023-01-21 Thread Bill Dunlap
Even Microsoft added snprintf to Visual C++ in 2015 (not that that matters for R). -Bill On Sat, Jan 21, 2023 at 2:47 AM Duncan Murdoch wrote: > On 21/01/2023 5:33 a.m., Holger Hoefling wrote: > > Hi, > > > > thanks for the tip! Is that available everywhere or do I need to set > > compiler

Re: [R-pkg-devel] corrupted NAMESPACE file

2023-01-20 Thread Bill Dunlap
Setting the locale to "C" (or perhaps some other non-UTF-8 locale) will show the BOM bytes. E.g., on Windows I get: > Sys.getlocale() [1] "LC_COLLATE=English_United States.utf8;LC_CTYPE=English_United States.utf8;LC_MONETARY=English_United States.utf8;LC_NUMERIC=C;LC_TIME=English_United

Re: [R-pkg-devel] NOTE about use of `:::`

2022-12-14 Thread Bill Dunlap
You could add an 'envir' argument to parse_args() and do your eval(..., envir=envir) stuff inside parse_args(). Then change call[[1]] <- quote(pense:::parse_args) args <- eval.parent(call) to call[[1]] <- quote(parse_args) call$envir <- parent.frame() args <- eval(call) [That code is

Re: [Rd] Lazy-evaluate elements wrapped with invisible

2022-10-29 Thread Bill Dunlap
> the `delayed` object is ready to be garbage collected if not assigned immediately. I am not sure what is meant here. Any object (at the R code level) is ready to be garbage collected if not given a name or is not part of an object with a name. Do you mean a 'delayed' component of a list

Re: [Rd] Lazy-evaluate elements wrapped with invisible

2022-10-28 Thread Bill Dunlap
You can play with the idea by returning an environment that contains delayed assignments. E.g., > f <- function(x) { +delayedAssign("eval_date", { cat("Evaluating 'date'\n"); date()}) +delayedAssign("sum_x", { cat("Evaluating 'sum_x'\n"); sum(x)}) +environment() + } > fx <- f(1:10) >

Re: [Rd] Parser bug? A comma too much.

2022-09-16 Thread Bill Dunlap
> By putting in the comma, unless I am mistaken, you are effectively > saying the second element is NULL, which is how it's naturally > defined. No, in f(x,) the second argument is missing, not NULL. -Bill On Fri, Sep 16, 2022 at 7:43 AM Avraham Adler wrote: > That may actually be the case

Re: [R-pkg-devel] Save and restoring random number seed in a package function

2022-09-14 Thread Bill Dunlap
> Yes, set.seed() cannot accept .Random.Seed as an input; it can only take a single integer. If I recall correctly, S-plus's set.seed() would accept a .Random.seed value as an input. It did some basic validation checks on it and set it as the current .Random.seed. I don't recall the name of the

Re: [R-pkg-devel] Warning... unable to translate 'Ekstrm' to a wide string; Error... input string 1 is invalid

2022-07-19 Thread Bill Dunlap
Have you tried changing the \x's in that file with \u's? > qx <- c("\xf6", "\xf8", "\xdf", "\xfc") > Encoding(qx) <- "latin1" > qu <- c("\uf6", "\uf8", "\udf", "\ufc") > Encoding(qu) [1] "UTF-8" "UTF-8" "UTF-8" "UTF-8" > qx == qu [1] TRUE TRUE TRUE TRUE (charToRaw shows that qu and qx are not

Re: [Rd] New R version - Issue with as.vector coercion on data.frame

2022-05-02 Thread Bill Dunlap
In R-4.1.2 (and before) as.vector(aDataFrame) returned aDataFrame, unchanged. E.g., 4.1.2> aDataFrame <- data.frame(X=101:103, Y=201:203, Z=301:303) 4.1.2> attr(aDataFrame, "anAttr") <- "an attribute" 4.1.2> identical(as.vector(aDataFrame), aDataFrame) [1] TRUE 4.1.2> dput(aDataFrame)

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Bill Dunlap
t have behavior > identical to paste0. Was that what you were getting at as well, Bill? > > ~G > > On Mon, Dec 6, 2021 at 4:11 PM Bill Dunlap > wrote: > >> Should paste0(character(0), c("a","b")) give character(0)? >> There is a fair bit of cod

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Bill Dunlap
Should paste0(character(0), c("a","b")) give character(0)? There is a fair bit of code that assumes that paste("X",NULL) gives "X" but c(1,2)+NULL gives numeric(0). -Bill On Mon, Dec 6, 2021 at 1:32 PM Duncan Murdoch wrote: > On 06/12/2021 4:21 p.m., Avraham Adler wrote: > > Gabe, I agree that

Re: [Rd] How is the environment variable "R_USER" defined?

2021-11-22 Thread Bill Dunlap
Is your C:\Users\yourname\Documents linked to OneDrive (either by your choice or by some administrator setting a group policy)? If so, ou could unlink it using OneDrive's settings dialog. Or you could set R_USER to avoid using ...\Documents. -Bill On Mon, Nov 22, 2021 at 8:47 AM Jiefei Wang

Re: [Rd] Inconsistent is.list results on 'by' objects

2021-11-16 Thread Bill Dunlap
Try adding simplify=FALSE to the call to by(). -Bill On Tue, Nov 16, 2021 at 4:04 AM Ofek Shilon wrote: > Take this toy code: > df <- data.frame(a=seq(10), b=rep(1:2, 5)) > df.empty <- subset(df, a>10) > byy <- by(data=df, INDICES=df$b, FUN=function(x) x[1,]) > byy.empty <-

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-30 Thread Bill Dunlap
The byte code attached to each function in a package can be surprisingly large. E.g., the byte code for the c. 300 line function Matrix:::replTmat seems to be c. 4.5 times the size of the raw code: > object.size(Matrix:::replTmat) / object.size(as.function(as.list(Matrix:::replTmat))) 5.5 bytes

Re: [R-pkg-devel] Internet resources and Errors

2021-09-24 Thread Bill Dunlap
Can you tell if the failure to download was due to a Solaris-specific issue or due to the Solaris test machine not being fully connected to the internet? -Bill On Fri, Sep 24, 2021 at 7:50 AM Roy Mendelssohn - NOAA Federal via R-package-devel wrote: > Hi All: > > I am getting dinged again on

Re: [R-pkg-devel] can't reproduce 'Additional issues' on CRAN with valgrind

2021-08-06 Thread Bill Dunlap
} > > s->data[0]='\0'; > > s->dim=size; > > s->len=0; > > > > My comment is indeed sloppy but the first byte is initialised to zero and > the rest is used for writing only > > (valgrind has no way to know, of course,

Re: [R-pkg-devel] can't reproduce 'Additional issues' on CRAN with valgrind

2021-08-02 Thread Bill Dunlap
I ran the tests of rbibutils-2.2.2, using the latest devel version of R configured to use valgrind, with R --debugger=valgrind --debugger-args=--track-origins=yes --quiet -e 'testthat::test_package("rbibutils")' I saw a lot of 'conditional jump depends on uninitialized value' errors: ==27280==

Re: [Rd] [R-pkg-devel] Tracking down inconsistent errors and notes across operating systems

2021-07-22 Thread Bill Dunlap
‘s_object’ 7 | static s_object* obj = NULL; |^~~~ On Thu, Jul 22, 2021 at 10:18 AM Bill Dunlap wrote: > I think the problem with RPostgreSQL/sec/RS-DBI.c comes from some changes > to Defn.h and Rinternals.h in RHOME/include that Luke made recently > (2021

Re: [R-pkg-devel] Tracking down inconsistent errors and notes across operating systems

2021-07-22 Thread Bill Dunlap
I think the problem with RPostgreSQL/sec/RS-DBI.c comes from some changes to Defn.h and Rinternals.h in RHOME/include that Luke made recently (2021-07-20, svn 80647). Since then the line #define s_object SEXPREC in Rdefines.h causes problems. Should it now be 'struct SEXPREC'? -Bill On

Re: [R-pkg-devel] weird C stack traces from win-builder, due to brms/rstan load?

2021-07-05 Thread Bill Dunlap
I think the stack trace is omitting the initial underscore in the symbol name: > c++filt _ZN4Rcpp8CppClassC1EPNS_6ModuleEPNS_10class_BaseERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE Rcpp::CppClass::CppClass(Rcpp::Module*, Rcpp::class_Base*, std::__cxx11::basic_string, std::allocator >&)

Re: [Rd] ALTREP ALTINTEGER_SUM/MIN/MAX Return Value and Behavior

2021-06-29 Thread Bill Dunlap
Adding the dimensions attribute takes away the altrep-ness. Removing dimensions does not make it altrep. E.g., > a <- 1:10 > am <- a ; dim(am) <- c(2L,5L) > amn <- am ; dim(amn) <- NULL > .Call("is_altrep", a) [1] TRUE > .Call("is_altrep", am) [1] FALSE > .Call("is_altrep", amn) [1] FALSE

Re: [Rd] Should last default to .Machine$integer.max-1 for substring()

2021-06-21 Thread Bill Dunlap
NULL cannot be in an integer or numeric vector so it would not be a good fit for substring's 'first' or 'last' argument (or substr's 'start' and 'stop'). Also, it is conceivable that string lengths may be 64 bit integers in the future, so why not use Inf as the default? Then the following would

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
:41 AM Bill Dunlap wrote: > The offending line in path_coeff seems to be >betas[i, 2:nvar] <- t(solve_svd(cor.x2, cor.y)) > where i is a single integer, nvar is 15, and the right hand side is a 14 > by 14 matrix. What is this line trying to do? Did it ever give the > correct

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
The offending line in path_coeff seems to be betas[i, 2:nvar] <- t(solve_svd(cor.x2, cor.y)) where i is a single integer, nvar is 15, and the right hand side is a 14 by 14 matrix. What is this line trying to do? Did it ever give the correct result? -Bill On Fri, Jun 4, 2021 at 7:39 AM B

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
That log file includes the line using R Under development (unstable) (2021-05-30 r80413) and later says The error most likely occurred in: > ### Name: path_coeff > ### Title: Path coefficients with minimal multicollinearity > ### Aliases: path_coeff path_coeff_mat > > ### ** Examples > > ##

Re: [Rd] base R pipe documentation

2021-05-18 Thread Bill Dunlap
It would be nice to have "|>" listed in the precedence table in help(Syntax). I think it has the same precedence as "%any%" and both are left-associative. > quote( a |> f1() %any% f2()) f1(a) %any% f2() > quote( a %any% f1() |> f2()) f2(a %any% f1()) help(`|>`) does mention magrittr's

Re: [R-pkg-devel] R vignettes

2021-04-29 Thread Bill Dunlap
cli does export col_red - did you omit the 'r' when calling it from your package or vignette? On Thu, Apr 29, 2021 at 9:29 AM Danielle Maeser wrote: > Hi Duncan, > > I really appreciate your response. Unfortunately, I am still receiving the > error below. > > If anyone has ideas, I'd appreciate

Re: [R-pkg-devel] Using ggplot2 within another package

2021-04-24 Thread Bill Dunlap
Has there been any thought given to an alternative to globalVariables that would flag certain arguments to certain functions as being evaluated in a non-standard way. E.g., usesNSE(FUN="with.default", ARGUMENTS="expr") usesNSE(FUN="lm", ARGUMENTS=c("weights","subset","offset"))

Re: [R-pkg-devel] Error on Solaris 10 'memory not mapped'

2021-04-01 Thread Bill Dunlap
Have you run the offending examples under valgrind on Linux with gctorture(TRUE)? -Bill On Thu, Apr 1, 2021 at 11:51 AM Zhang, Wan wrote: > > Hello, > > In our package “BET” version 0.3.4 published on 2021-03-21, there is a > “memory not mapped” error on Solaris 10. > >

Re: [Rd] Surprising behavior when using the reference class with the dollar symbol

2021-03-27 Thread Bill Dunlap
> > It looks like when calling the dollar symbol using the function format, it > > treats the input argument as a character literal and does not evaluate it > > inside the function. I know we have the function `field` to get the slot > > variable, but I wonder if this is designed on purpose as the

Re: [Rd] Potential improvements of ave?

2021-03-16 Thread Bill Dunlap
Your proposed change (roughly, replacing interaction() by unique(paste())) slows down ave() considerably when there are long columns with lots of repeated rows. I think that interaction(drop=TRUE, ...) can be changed to use less memory and be faster by making a separate branch for drop=TRUE that

Re: [R-pkg-devel] rcmdcheck reports wrong version of lattice

2021-03-08 Thread Bill Dunlap
I haven't followed all the code branches in tools:::.check_packages(), but some of them use --vanilla when running the R subprocess that does the checking. I think that would mean that libraries in ~/R would not be in the search path. -BIll On Mon, Mar 8, 2021 at 8:45 AM Thierry Onkelinx

Re: [R-pkg-devel] How to R CMD build / check using LTO

2021-02-18 Thread Bill Dunlap
77_CALL > and declare the subroutines' respective variables as > integer(kind=c_int)... Was that your suggestion? Or is there an easier way? > > Thanks > > Paul > > On 2/17/21 9:48 PM, Bill Dunlap wrote: > > I suspect your problem is that, at least with the recent gnu > &g

Re: [R-pkg-devel] How to R CMD build / check using LTO

2021-02-17 Thread Bill Dunlap
I suspect your problem is that, at least with the recent gnu compilers, the Fortran 'c_logical' maps to the C _Bool, not the C int. -Bill On Wed, Feb 17, 2021 at 11:38 AM Paul Schmidt-Walter wrote: > > Dear Team, > > My package 'LWFBrook90R' (https://github.com/pschmidtwalter/LWFBrook90R) > was

Re: [Rd] Corrupt internal row names when creating a data.frame with `attributes<-`

2021-02-16 Thread Bill Dunlap
as.matrix.data.frame does not take the absolute value of that number: > dPos <- structure(list(X=101:103,201:203),class="data.frame",row.names=c(NA_integer_,+3L)) > dNeg <- structure(list(X=101:103,201:203),class="data.frame",row.names=c(NA_integer_,-3L)) > rownames(as.matrix(dPos)) [1]

Re: [Rd] brief update on the pipe operator in R-devel

2021-01-15 Thread Bill Dunlap
If 3 |> x => f(x, y=x) were allowed then I think that runif(1) |> x => f(x, y=x) be parsed as f(runif(1), y=runif(1)) so runif(1) would be evaluated twice, leading to incorrect results from f(). -Bill On Fri, Jan 15, 2021 at 2:16 PM Avi Gross via R-devel wrote: > Gabor, > >

Re: [Rd] [External] brief update on the pipe operator in R-devel

2021-01-13 Thread Bill Dunlap
{ if (!is.list(expr)) { expr <- as.list(expr) } nms <- names(expr) for (i in seq_along(expr)) { str.language(expr[[i]], name=nms[[i]], indent = indent + 1) } } invisible(expr) } On Tue, Jan 12, 2021 at 1:16 P

Re: [Rd] [External] brief update on the pipe operator in R-devel

2021-01-12 Thread Bill Dunlap
'=>' can be defined as a function. E.g., it could be the logical "implies" function: > `=>` <- function(x, y) !x | y > TRUE => FALSE [1] FALSE > FALSE => TRUE [1] TRUE It might be nice then to have deparse() display it as an infix operator instead of the current prefix: >

Re: [R-pkg-devel] accessing call constructors in Cpp

2021-01-05 Thread Bill Dunlap
Try using their official names, Rf_ScalarReal, Rf_eval, Rf_install, etc. You may have #defined R_NO_REMAP in code that you did not show us. -Bill On Tue, Jan 5, 2021 at 1:42 PM Oliver Madsen wrote: > This is maybe better suited for Rcpp-devel or another mailing list. If so, > I apologize. :-)

Re: [Rd] From .Fortran to .Call?

2020-12-31 Thread Bill Dunlap
As the proverbial naive R (ab)user I’m left wondering: o if I updated my quantreg_init.c file in accordance with Bill’s suggestion could I then simply change my .Fortran calls to .Call? No. .Call(C_func, arg1, arg2) expects C_func's arguments to all be SEXP* (pointers to

Re: [Rd] From .Fortran to .Call?

2020-12-31 Thread Bill Dunlap
. -Bill On Wed, Dec 23, 2020 at 8:27 AM Bill Dunlap wrote: >As the proverbial naive R (ab)user I’m left wondering: > > o if I updated my quantreg_init.c file in accordance with Bill’s > suggestion could I > then simply change my .Fortran calls to .Call?

Re: [Rd] From .Fortran to .Call?

2020-12-19 Thread Bill Dunlap
To make C prototypes for routines defined in a *.f file you can use gfortran's -fc-prototypes-external flag. You still have to convert 'name_' to 'F77_NAME(name). bill@Bill-T490:~/packages/quantreg/src$ gfortran -fc-prototypes-external -fsyntax-only boot.f ... [elided defs of complex types] ...

Re: [Rd] the pipe |> and line breaks in pipelines

2020-12-09 Thread Bill Dunlap
When I am debugging a function with code like x <- f1(x) x <- f2(x) result <- f3(x) I will often slip a line like '.GlobalEnv$tmp1 <- x' between the first two lines and '.GlobalEnv$tmp2 <- x' between the last two lines and look at the intermediate results, 'tmp1' and 'tmp2' in the

Re: [Rd] [R/S-PLUS] [EXTERNAL] Re: [External] anonymous functions

2020-12-07 Thread Bill Dunlap
One advantage of the new pipe operator over magrittr's is that the former works with substitute(). > f <- function(x, xlab=deparse1(substitute(x))) paste(sep="", xlab, ": ", paste(collapse=", ",x)) > 2^(1:4) |> f() [1] "2^(1:4): 2, 4, 8, 16" > 2^(1:4) %>% f() [1] ".: 2, 4, 8, 16" This is

Re: [Rd] all.equal applied to function closures

2020-12-01 Thread Bill Dunlap
nv(list(p=1.5), parent=new.env(parent=baseenv( > base::all.equal.environment(E1,E3) [1] TRUE > globalenv()$all.equal.environment(E1,E3) [1] " Component “p”: Mean relative difference: 0.1538462" [2] " target is and current is " On Tue, Dec 1, 2020 at 1:31 AM Martin M

Re: [Rd] all.equal applied to function closures

2020-11-30 Thread Bill Dunlap
To make the comparison more complete, all.equal.environment could compare the parents of the target and current environments. That would have to be recursive but could stop at the first 'top level environment' (the global, empty, or a package-related environment generally) and use identical

Re: [Rd] .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-23 Thread Bill Dunlap
The call to system() probably is an internal call used to delete the session's tempdir(). This sort of failure means that a potentially large amount of disk space is not being recovered when R is done. Perhaps R_CleanTempDir() could call R_unlink() instead of having a subprocess call 'rm -rf

Re: [Rd] return (x+1) * 1000

2020-11-20 Thread Bill Dunlap
Perhaps the parser should warn if you use return() at all. It is rarely needed and is akin to the evil 'GOTO' statement in that it makes the flow of control less obvious to the reader. -Bill On Fri, Nov 20, 2020 at 2:37 PM Mateo Obregón wrote: > I'm not thinking of complicated cases. > > This

Re: [Rd] formatting issue with gcc 9.3.0 on Ubuntu on WSL2

2020-11-18 Thread Bill Dunlap
fixed the problem. This also fixed one of my test C programs: '1.0L + 1e-60L > 1.0L' was true if I compiled with gcc -O but false with no optimization. On Wed, Nov 18, 2020 at 3:56 AM Iñaki Ucar wrote: > On Wed, 18 Nov 2020 at 10:26, Tomas Kalibera > wrote: > > > > On 1

[Rd] formatting issue with gcc 9.3.0 on Ubuntu on WSL2

2020-11-17 Thread Bill Dunlap
I just got a new Windows laptop (i7, 10th generation CPU), installed 'Windows Subsystem for Linux 2' and then installed Ubuntu 20.04 and used 'apt-get install' to install packages that the R build seems to require. In particular, I am using gcc version 9.3.0. The build went without a hitch but

[Rd] (no subject)

2020-11-04 Thread Bill Dunlap
Hi All, I am no longer with TIBCO and hope to be able to contribute more directly to R now. It will take a little while to set up a build environment and to start working on some bugzilla issues. -Bill Dunlap williamwdun...@gmail.com [[alternative HTML version deleted

Re: [Rd] tools::package_dependencies problems

2020-10-16 Thread Bill Dunlap
Have you tried using the 'db' argument to tools::package_dependencies? rbind the common columns of installed.packages() and available.packages() and use that as the package database. installed <- installed.packages() available <- available.packages() commonCols <-

Re: [Rd] (PR#12770) format() under Windows giv wrong resuts with

2008-09-10 Thread Bill Dunlap
... signatures ... Bill Dunlap TIBCO Spotfire wdunlap tibco.com All statements in this message represent the opinions of the author and do not necessarily reflect TIBCO Software Inc. policy or position

Re: [Rd] (PR#12770) format() under Windows giv wrong resuts w

2008-09-10 Thread Bill Dunlap
On Wed, 10 Sep 2008, Bill Dunlap wrote: I can reproduce the problem on Windows XP service pack 3 with R 2.8.0-dev if I set the locale to italian (by default it is English_United States for me): pippo=strptime(23:43:12, format=%H:%M:%S) format(pippo, format=%I:%M:%S %p) [1] 11:43

[Rd] should system.file(package=no such pkg, no such file) warn or abort?

2008-09-09 Thread Bill Dunlap
(file.path(...)), in package , dQuote(package)) } Bill Dunlap TIBCO Spotfire bill at insightful dot com (for a while) All statements in this message represent the opinions of the author and do not necessarily reflect TIBCO

Re: [Rd] (PR#12628) Second X11 call with invalid display crashes R after first X11 call.

2008-08-28 Thread Bill Dunlap
On Thu, 28 Aug 2008, Prof Brian Ripley wrote: This is an Xt error, whereas the first one is an Xlib error. It is easy to trap it. You do realize that this will never work? In the current setup all open X11 devices must be on the same display, and 'display' is ignored if a device is

Re: [Rd] dput function (PR#12112)

2008-08-07 Thread Bill Dunlap
) Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position. __ R-devel@r-project.org

Re: [Rd] dput function (PR#12112)

2008-08-07 Thread Bill Dunlap
clearly be PROTECT-ed (I suspect the original version didn't need to be, but leaving PROTECTs off is prejudicial to future maintenance), so I've incorporated this in R-devel/R-patched. Brian On Thu, 7 Aug 2008, Bill Dunlap wrote: On Thu, 7 Aug 2008 [EMAIL PROTECTED] wrote: Full_Name: Juan

Re: [Rd] closing View windows after multiple View(x) crashes

2008-07-29 Thread Bill Dunlap
button to close the View window, the event loop doesn't get reentered, and valgrind seems happy. I'm using R on Red Hat Enterprise Linux WS release 4 (Nahant Update 3) with the Cygwin X server on a Windows XP laptop. Bill

Re: [Rd] closing View windows after multiple View(x) crashes

2008-07-29 Thread Bill Dunlap
Valgrind reports a slew of memory leaks when R closes after using View(), but it didn't show any use of freed or uninitialized memory after that change. Bill Dunlap Insightful Corporation bill at insightful dot com All

Re: [Rd] Checking package help file examples

2008-07-18 Thread Bill Dunlap
On Fri, 18 Jul 2008, Arne Henningsen wrote: On Friday 18 July 2008 02:19:14, Bill Dunlap wrote: I am trying to figure out the sanctioned way for 'R CMD check pkg' to make sure that the examples in help files give the expected results. Writing R Extensions says that check runs the help

[Rd] Checking package help file examples

2008-07-17 Thread Bill Dunlap
examples for correctness. (It would be nicer if the example() function could also check for correctness, and the above method doesn't allow for that.) Bill Dunlap Insightful Corporation bill at insightful dot com 360-428

[Rd] memory leak in readline code

2008-07-10 Thread Bill Dunlap
/a/homer.insightful.com/users/bill/R-svn/r-devel/R/share/locale/en/LC_MESSAGES/R.mo /usr/lib/locale/locale-archive Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message

[Rd] memory leak in sub([range],...)

2008-07-09 Thread Bill Dunlap
://bugs.r-project.org/cgi-bin/R, but I cannot find it there now.] Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions of the author and do not necessarily

Re: [Rd] how to install header files in package

2008-06-13 Thread Bill Dunlap
? Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position. __ R

Re: [Rd] arima() bug

2008-06-12 Thread Bill Dunlap
= 367 (gdb) print q $4 = 366 Trying to recover from running out of memory probably causes the crash. rbar is a scratch array. Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message

Re: [Rd] Routine and Deep testing with R CMD check

2008-06-11 Thread Bill Dunlap
each test. Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position

Re: [Rd] read.table() causes segfault with incorrect data (PR#11627)

2008-06-11 Thread Bill Dunlap
@@ if(con-nPushBack 0) { for(j = 0; j con-nPushBack; j++) free(con-PushBack[j]); free(con-PushBack); +con-nPushBack = 0 ; } return R_NilValue; } Bill Dunlap Insightful Corporation bill

Re: [Rd] Routine and Deep testing with R CMD check

2008-06-11 Thread Bill Dunlap
On Wed, 11 Jun 2008, Prof Brian Ripley wrote: Bill Dunlap wrote: It might be nice if check could print the time it took to do each test. That's an existing request for various parts of the checking procedure. When the time to run a package check jumps up, it is sometimes tedious to find

[Rd] Splus/R typedef for C equivalent of S integer

2008-06-04 Thread Bill Dunlap
. If we can come to a consensus on the name, typedef/#define, and which *.h file, I can put it into Splus. Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions

Re: [Rd] Splus/R typedef for C equivalent of S integer

2008-06-04 Thread Bill Dunlap
\n, x_zero); will not work properly in Splus. Thanks, Bill Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do

Re: [Rd] Reading an unsigned long long using R readBin()

2008-05-30 Thread Bill Dunlap
? Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position. __ R-devel@r-project.org

Re: [Rd] bug in R 2.7.0 (PR#11497)

2008-05-22 Thread Bill Dunlap
On Thu, 22 May 2008, Bill Dunlap wrote: Also, if your input starts with certain errors, parse returns the stuff after the error: parse() ?err//one expression(one) After the attached change we get parse() ?one expression(one) parse(n=2) ?one;two;three

Re: [Rd] a R_PV problem

2008-05-06 Thread Bill Dunlap
Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position

Re: [Rd] non-digits in svnversion output mess up windows build if USE_SVNVERSION=yes (PR#11339)

2008-04-29 Thread Bill Dunlap
to include the output of 'svn diff' in the distribution so a user or tester could see how this version was different than the official one. On 29/04/2008 2:30 PM, [EMAIL PROTECTED] wrote: Full_Name: Bill Dunlap Version: 2.8.0dev OS: Windows XP Submission from: (NULL) (70.98.76.47) I

Re: [Rd] plot(x) in 2.7.0 (with y=NULL) proposed code correction

2008-04-22 Thread Bill Dunlap
on both axes) plot(1:10, 1:10, main=no pi's on either axis) par(mfrow=c(2,2)) Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author

Re: [Rd] prod(0, 1:1000) ; 0 * Inf etc

2008-04-21 Thread Bill Dunlap
://stat.ethz.ch/mailman/listinfo/r-devel Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do not necessarily reflect Insightful

Re: [Rd] nondigits in R_FILEVERSION mess up Windows build

2008-04-19 Thread Bill Dunlap
On Fri, 18 Apr 2008, Bill Dunlap wrote: I tried for the first time to build R from source on Windows, where I got the source code via svn. Per the Installation and Administration manual, I altered src\gnuwin32\MkRules so it had the the locally correct paths to HTML Help Workshop and Inno

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Bill Dunlap
0.500 0.170 0.672 system.time(is.unsorted.no.nacheck(revx),gcFirst=TRUE) user system elapsed 0.131 0.000 0.132 Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Bill Dunlap
that there be 1's at both ends of the input vector. Perhaps I miscopied the code. Bill Dunlap Insightful Corporation bill at insightful dot com All statements in this message represent the opinions of the author and do

Re: [Rd] 'merge' function: behavior w.r.t. NAs in the key column

2008-03-19 Thread Bill Dunlap
NA NA 2 NA 1 R: 4 NA NA 22 2 R: 5 NA3 3 NA 1 R: 6 NA3 32 2 I'll add an explicit link to help those who don't believe that 'match' is a documented concept. On Fri, 14 Mar 2008, Bill Dunlap wrote: On Fri, 14

Re: [Rd] read.table: aborting based on a time constraint

2008-01-09 Thread Bill Dunlap
it to catch the interrupt. This is pretty ugly, but I was wondering if R had the facilities to write such a timeout() function. I used to use it to automate tests of infinite-loop bugs. Bill Dunlap Insightful Corporation

Re: [Rd] C/C++ 'assert' should not be used in R packages

2007-11-10 Thread Bill Dunlap
. Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position. __ R-devel@r

Re: [Rd] Use of all/any

2007-10-26 Thread Bill Dunlap
}) } } changeLogCalls(function(x)log(x,2)/log(x)) function(x) logb(x, 2)/log(x) I suspect I should be looking in codetools for this sort of thing. Bill Dunlap Insightful Corporation bill at insightful dot com All statements

Re: [Rd] Rd2dvi (PR#9812)

2007-07-26 Thread Bill Dunlap
){ Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position

Re: [Rd] sequence(c(2, 0, 3)) produces surprising results, would like output length to be sum(input) (PR#9811)

2007-07-26 Thread Bill Dunlap
On Thu, 26 Jul 2007 [EMAIL PROTECTED] wrote: Full_Name: Bill Dunlap Version: 2.5.0 OS: Linux Submission from: (NULL) (70.98.76.47) sequence(nvec) is documented to return the concatenation of seq(nvec[i]), for i in seq(along=nvec). This produces inconvenient (for me) results for 0 inputs

Re: [Rd] dict package: dictionary data structure for R

2007-07-22 Thread Bill Dunlap
1486 2717 1608 289 20 Perhaps new.env() should push the requested size up to the next prime by default. (This is not to say your other changes are not improvements.) Bill Dunlap Insightful Corporation bill

  1   2   >