Re: [Rd] Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path

2020-04-15 Thread Dean Attali
bar") : > #> path[1]="foo/bar": No such file or directory > #> [1] "foo/bar" > > fs::path_abs("foo/bar") > #> /Users/jhester/foo/bar > > [1]: https://CRAN.R-project.org/package=fs > > > On Tue, Apr 14, 202

[Rd] Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path

2020-04-14 Thread Dean Attali
This request stems off a bug report I posted https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17757 where it was determined the current behaviour is as expected. To recap: when given a real file, normalizePath() always* returns the full absolute path. When given a non-existent file, normalizePa

[Rd] Bug in print.default: dispatches to global show instead of methods::show

2019-02-21 Thread Dean Attali
This is related to a problem that was fixed in 2015 https://github.com/wch/r-source/commit/38ea40dcd0353af16d35296ee621338c49ae48c9 The problem then was that auto-printing by typing an object to the console would search for show() in the globalenv instead of in the methods namespace. The problem I

[Rd] Bug in tools::md5sum - does not work when filepath contains tilde (ie home directory)

2018-06-29 Thread Dean Attali
I've reproduced on ubuntu and winodws with R3.4.3 When the filepath contains a tilde, the result is NA. But if the file path is expanded then the function works. Example: tools::md5sum("~/.Rprofile") returns NA tools::md5sum(normalizePath("~/.Rprofile")) returns the proper md5 Perhaps this is e

Re: [Rd] 'vapply' not returning list element names when returned element is a length-1 list

2015-08-05 Thread Dean Attali
-Original Message- > > From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of Dean > Attali > > If i have a function that returns a named list with 2 (or more) elements, > > then using 'vapply' retains the names of the elements: > > > >

[Rd] 'vapply' not returning list element names when returned element is a length-1 list

2015-08-03 Thread Dean Attali
Hi all Sorry for the confusing title. I noticed the following inconsistency: If i have a function that returns a named list with 2 (or more) elements, then using 'vapply' retains the names of the elements: > vapply(1:3, function(x) list("foo" = "bar", "hello" = "world"), > vector("list", 2))

Re: [Rd] Why no support for 3-digit HEX colours?

2015-07-12 Thread Dean Attali
And very recent as well, good to know, thanks! --- http://deanattali.com On 12 July 2015 at 13:32, Duncan Murdoch wrote: > On 12/07/2015 3:51 PM, Dean Attali wrote: > > When specifying an RGB colour in R, is there a strong reason not to > accept > > 3-character HEX codes? In

[Rd] Why no support for 3-digit HEX colours?

2015-07-12 Thread Dean Attali
When specifying an RGB colour in R, is there a strong reason not to accept 3-character HEX codes? In CSS and many other languages, a colour of "#ABC" is automatically converted to "#AABBCC", and I was wondering if R could support that as well, or if it was a conscious decision to not support it.

Re: [Rd] Graphical User Interface (GUI)

2015-07-08 Thread Dean Attali
Isn't this exactly what Shiny is meant for? http://shiny.rstudio.com/ --- http://deanattali.com On 8 July 2015 at 11:43, vthokienj wrote: > I'd like to create a user interface for my R code and have only seen mostly > older posts on the subject. > I'm not looking for an IDE for development, but

[Rd] Defining a `show` function breaks the print-ing of S4 object -- bug or expected?

2015-06-30 Thread Dean Attali
Hi r-devel If you define a function named `show` or attach a package with an exported `show` function, then printing/vieweing S4 objects breaks. This is probably because the `print` function calls `show`, which is now masked. Example: show <- function() {} > setClass("Person", slots = list(name