Displaying 20 results from an estimated 20000 matches similar to: "FR: names= argument for load()"
2025 Apr 23
1
R should add an API routine for safe use of memcpy(), memset() for use with 0-length SEXP
On 4/24/25 00:18, Michael Chirico wrote:
> In that case it seems like just erroring instead of returning invalid
> pointers is a much friendlier option. Why give developers an unpinned
> grenade to carry around?
That would be too strict at this point. There is too much code around 
depending on that holding on to an invalid pointer (but not 
dereferencing it) is ok, and it is currently
2019 Sep 17
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
Dear Herve,
The brief() generic function in the car package does something very similar to that for data frames (and has methods for other classes of objects as well).
Best,
 John
  -----------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox
> On Sep 17, 2019, at 2:52 AM, Pages, Herve <hpages at
2019 Sep 17
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
Dear Herve,
Sorry, I should have said "matrices" rather than "data frames" -- brief() has methods for both.
Best,
 John
  -----------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox
> On Sep 17, 2019, at 8:29 AM, Fox, John <jfox at mcmaster.ca> wrote:
> 
> Dear Herve,
2010 Feb 16
1
Total and heading of portfoilo table
Dear R helpers,
I have two input files as 'quantity.csv' and 'equity_price.csv' as (for example) given below.
'quantity.csv'
GOOG     YHOO
1000         100
'equity_price.csv'
sr_no   GOOG_price           YHOO_price
1            15.22                 536.40
2            15.07                 532.97
3            15.19                 534.05  
4           
2019 Oct 18
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
Hi Martin et al.
Sorry for not getting back onto this sooner. I've been pretty well buried
under travel plus being sick for a bit, but I will be happy to roll up a
patch for this, including documentation and put it into a wishlist item.
I'll aim to do that at some point next week.
Thanks @Martin Maechler <maechler at stat.math.ethz.ch> for engaging with us
and being willing to
2017 May 23
0
Inconsistency in handling of numeric input with %d by sprintf
Yes, what Joris posts about is exactly what I noted in my March 9th post to
R-devel. The behaviour is sort of documented, but not in the clearest
manner (in my opinion). Like I say, my ultimate conclusion was that the
silent coercion of numerics to integers by sprintf() was a handy
convenience, but not one that should be relied about to always work
predictably.
On Tue, May 23, 2017 at 10:02 AM,
2013 Jul 17
1
On the mechanics of function evaluation and argument matching
Hello,
Section 4.3.2 of the R language definition [1] states that argument matching to formal arguments is a 3-pass process to match arguments to a function. An error is generated if any (supplied) arguments are left unmatched. Interestingly the opposite is not true as any unmatched formals does not generate an error.
> f <- function(x,y,z) x
> f(2)
[1] 2
> f(2,3)
[1] 2
Since R is
2025 Jan 30
2
Suggestion to emphasize Rboolean is unrelated to LGLSXP in R-exts
Hello all,
The recent change (r87656) to make Rboolean map to type 'bool', not
'int', broke some tests & made me realize I've had totally the wrong
impression about what Rboolean actually is, and I suspect I'm not
alone.
Till now, I've assumed that like Rbyte --> RAWSXP, Rboolean is the
_correct_ storage type for LGLSXP, while idioms like int *ip =
LOGICAL(...)
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
https://github.com/Rdatatable/data.table/issues/2171
The fix was easy, it's just surprising to see the behavior change almost on
a whim. Just wanted to point it out in case this is unknown behavior, but
Evan seems to have found this as well.
On Tue, May 23, 2017 at 12:00 PM, Michael Chirico <michaelchirico4 at gmail.com
> wrote:
> Astute observation. And of course we should be
2025 Feb 01
2
[SPAM Warning!] Suggestion to emphasize Rboolean is unrelated to LGLSXP in R-exts
On Thu, 30 Jan 2025 13:07:31 -0800
Michael Chirico <michaelchirico4 at gmail.com> wrote:
> There are at least dozens of other cases on CRAN [2],[3].
Some of these involve casting an int to Rboolean. Best case, the int is
compared against NA_LOGICAL beforehand, avoiding any mistake (there's
at least one like that). Worst case, NA_LOGICAL is not considered before
the cast, so NA will
2019 Sep 16
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
Awesome. Gabe, since you already have a workshopped version, would you like
to proceed? Feel free to ping me to review the patch once it's posted.
On Mon, Sep 16, 2019 at 3:26 PM Martin Maechler <maechler at stat.math.ethz.ch>
wrote:
> >>>>> Michael Chirico
> >>>>>     on Sun, 15 Sep 2019 20:52:34 +0800 writes:
>
>     > Finally read in
2019 Sep 17
2
head.matrix can return 1000s of columns -- limit to n or add new argument?
>>>>> Fox, John 
>>>>>     on Tue, 17 Sep 2019 12:32:13 +0000 writes:
    > Dear Herve,
    > Sorry, I should have said "matrices" rather than "data frames" -- brief() has methods for both.
    > Best,
    > John
    > -----------------------------
    > John Fox, Professor Emeritus
    > McMaster University
    >
2019 May 27
0
rbind has confusing result for custom sub-class (possible bug?)
Follow-up (inline) on my comment about a potential issue in `[<-.Date`.
On Mon, May 27, 2019 at 9:31 AM Michael Chirico
<michaelchirico4 at gmail.com> wrote:
>
> Yes, thanks for following up on thread here. And thanks again for clearing things up, your email was a finger snap of clarity on the whole issue.
>
> I'll add that actually it was data.table's code at fault
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
I initially thought this is "documented behaviour". ?sprintf says:
Numeric variables with __exactly integer__ values will be coerced to
integer. (emphasis mine).
Turns out this only works when the first value is numeric and not NA, as
shown by the following example:
> sprintf("%d", as.numeric(c(NA,1)))
Error in sprintf("%d", as.numeric(c(NA, 1))) :
  invalid
2017 May 23
0
Inconsistency in handling of numeric input with %d by sprintf
Hi Michael,
I posted something on this topic to R-devel several weeks ago, but never
got a response. My ultimate conclusion is that sprintf() isn't super
consistent in how it handles coercion: sometimes it'll coerce real to
integer without complaint, other times it won't. (My particular email had
to do with the vectors longer than 1 and their positioning vis-a-vis the
format string.)
2019 Jan 11
0
strtoi output of empty string inconsistent across platforms
>>>>> Michael Chirico 
>>>>>     on Fri, 11 Jan 2019 14:36:17 +0800 writes:
    > Identified as root cause of a bug in data.table:
    > https://github.com/Rdatatable/data.table/issues/3267
    > On my machine, strtoi("", base = 2L) produces NA_integer_
    > (which seems consistent with ?strtoi: "Values which cannot
    > be
2017 May 23
0
Inconsistency in handling of numeric input with %d by sprintf
Astute observation. And of course we should be passing integer when we use
%d. It's an edge case in how we printed ITime objects in data.table:
On Tue, May 23, 2017 at 11:53 AM, Joris Meys <jorismeys at gmail.com> wrote:
> I initially thought this is "documented behaviour". ?sprintf says:
>
> Numeric variables with __exactly integer__ values will be coerced to
>
2016 Apr 20
2
Lazily Loaded Modules and Linker::LinkOnlyNeeded
+cc Artem, who added the LinkOnlyNeeded flag.
On Wed, Apr 20, 2016 at 9:18 AM, Mehdi Amini via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Neil,
>
> On Apr 20, 2016, at 5:20 AM, Neil Henning via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> TL;DR - when linking from a lazily loaded module and using
> Linker::LinkOnlyNeeded, bodies of used functions
2018 Mar 01
0
scale.default gives an incorrect error message when is.numeric() fails on a dgeMatrix
>>>>> Michael Chirico <michaelchirico4 at gmail.com>
>>>>>     on Tue, 27 Feb 2018 20:18:34 +0800 writes:
Slightly amended 'Subject': (unimportant mistake: a dgeMatrix is *not* sparse)
MM: modified to commented R code,  slightly changed from your post:
## I am attempting to use the lars package with a sparse input feature matrix,
## but the following
2023 Mar 01
1
tab-complete for non-syntactic names could attempt backtick-wrapping
Great suggestion! I've started a patch:
https://bugs.r-project.org/show_bug.cgi?id=18479
On Wed, Mar 1, 2023 at 1:56 AM Ivan Krylov <krylov.r00t at gmail.com> wrote:
>
> ? Wed, 1 Mar 2023 01:36:02 -0800
> Michael Chirico via R-devel <r-devel at r-project.org> ?????:
>
> > +comps[non_syntactic] <- paste0("`", comps[non_syntactic], "`")
>