Displaying 20 results from an estimated 35 matches for "harmse".
Did you mean:
harms
2023 Nov 03
1
[EXTERNAL] RE: I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
...hat will halve the number of multiplications.
If you?re looking for such optimisations then you can also consider ifelse(G=='male', 65L, 58L). That will definitely use less time & memory if WC is integer, but the trade-offs are more complicated if WC is floating point.
Regards,
Jorgen Harmse.
From: avi.e.gross at gmail.com <avi.e.gross at gmail.com>
Date: Friday, November 3, 2023 at 16:12
To: Jorgen Harmse <JHarmse at roku.com>, r-help at r-project.org <r-help at r-project.org>, mkzaman.m at gmail.com <mkzaman.m at gmail.com>
Subject: [EXTERNAL] RE: [R] I nee...
2023 Nov 03
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
...df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG))
since WC and TG are not conditional, would this be a slight improvement?
df$LAP <- with(df, TG*(WC - ifelse(G=='male', 65, 58)))
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Jorgen Harmse via
R-help
Sent: Friday, November 3, 2023 11:56 AM
To: r-help at r-project.org; mkzaman.m at gmail.com
Subject: Re: [R] I need to create new variables based on two numeric
variables and one dichotomize conditional category variables.
df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-...
2025 Jan 06
2
Extracting specific arguments from "..."
...are,
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
Cell phone 443-418-5382
________________________________________
From: R-help <r-help-bounces at r-project.org> on behalf of Bert Gunter <bgunter.4567 at gmail.com>
Sent: Monday, January 6, 2025 5:22 PM
To: Jorgen Harmse
Cc: r-help at r-project.org
Subject: Re: [R] Extracting specific arguments from "..."
Thanks Jorgen.
I thought your approach to getting the argument expressions was clever, but
somewhat convoluted. I think the usual simple way is to use match.call()
(or sys.call() )to get the unevaluate...
2024 Jul 30
1
round and trailing zero
...ay? (One thing I like about Excel is that I can change the display format of a cell without changing answers that depend on that cell.) In the latter case, why stash them in a variable? For more control of the display, consider sprintf (or a wrapper that combines sprintf with cat).
Regards,
Jorgen Harmse.
[[alternative HTML version deleted]]
2025 Jan 06
1
Extracting specific arguments from "..."
...may have to wrestle with sys.call() and it's "wh" argument to make
things work the way you want in that situation. I leave such delights to
wiser heads, as well as any corrections or refinements to anything that
I've said here.
Cheers,
Bert
On Mon, Jan 6, 2025 at 9:55?AM Jorgen Harmse <JHarmse at roku.com> wrote:
> I think Bert Gunter is right, but do you want partial matches (not found
> by match), and how robust do you want the code to be?
>
>
>
> f <- function(?)
>
> { pos <- match('a', ...names())
>
> if (is.na(pos))
>...
2024 Apr 08
1
duplicated() on zero-column data frames returns empty
...to issue a warning that the change is coming in a future version.) The protection for old code could be just a warning that can be turned off with a call to options. The new documentation should be more explicit.
Regards,
Jorgen.
From: Mark Webster <markwebster204 at yahoo.co.uk>
To: Jorgen Harmse <jharmse at roku.com>, Ivan Krylov
<ikrylov at disroot.org>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Subject: Re: [R] duplicated() on zero-column data frames returns empty
Message-ID: <603481690.9150754.1712522666289 at mail.yahoo.com>
Conten...
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG))
That will do both calculations and merge the two vectors appropriately. It will use extra memory, but it should be much faster than a 'for' loop.
Regards,
Jorgen Harmse.
------------------------------
Message: 8
Date: Fri, 3 Nov 2023 11:10:49 +1030
From: "Md. Kamruzzaman" <mkzaman.m at gmail.com>
To: r-help at r-project.org
Subject: [R] I need to create new variables based on two numeric
variables and one dichotomize conditional category...
2025 Jan 07
1
Extracting specific arguments from "..."
.../GR)
>Baltimore, MD 21201-1524
>Cell phone 443-418-5382
>
>
>
>
>________________________________________
>From: R-help <r-help-bounces at r-project.org> on behalf of Bert Gunter <bgunter.4567 at gmail.com>
>Sent: Monday, January 6, 2025 5:22 PM
>To: Jorgen Harmse
>Cc: r-help at r-project.org
>Subject: Re: [R] Extracting specific arguments from "..."
>
>Thanks Jorgen.
>
>I thought your approach to getting the argument expressions was clever, but
>somewhat convoluted. I think the usual simple way is to use match.call()
>(or s...
2025 Jan 06
1
Extracting specific arguments from "..."
...equired.")
?elt(pos)
}
Incidentally, what is the best way to extract the expression without evaluating it?
g <- function(...)
{ pos <- match('a',...names())
if (is.na(pos))
stop("a is missing.")
(function(a,...) substitute(a)) (...)
}
Regards,
Jorgen Harmse.
Message: 8
Date: Sun, 5 Jan 2025 11:17:02 -0800
From: Bert Gunter <bgunter.4567 at gmail.com>
To: Iris Simmons <ikwsimmo at gmail.com>
Cc: R-help <R-help at r-project.org>
Subject: Re: [R] Extracting specific arguments from "..."
Message-ID:
<CAGxFJbROnopt-b...
2025 Jan 07
1
Extracting specific arguments from "..."
...ne 443-418-5382
> >
> >
> >
> >
> >________________________________________
> >From: R-help <r-help-bounces at r-project.org> on behalf of Bert Gunter <
> bgunter.4567 at gmail.com>
> >Sent: Monday, January 6, 2025 5:22 PM
> >To: Jorgen Harmse
> >Cc: r-help at r-project.org
> >Subject: Re: [R] Extracting specific arguments from "..."
> >
> >Thanks Jorgen.
> >
> >I thought your approach to getting the argument expressions was clever,
> but
> >somewhat convoluted. I think the usual sim...
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender.
I'm not sure it would in any way be quicker. But might be to some extent
easier to develop variations of. And is sort of what factors should be
doing...
# make dummy data
gender <- c("Male", "Female", "Male", "Female")
WC <- c(70,60,75,65)
TG <- c(0.9, 1.1, 1.2, 1.0)
myDf <- data.frame( gender, WC, TG )
#
2024 May 13
1
duplicated() on zero-column data frames returns empty
>?If you would like to try your hand at developing a patch and make a
> case for it at R-devel or the Bugzilla, the resources at
> <https://contributor.r-project.org/> can be helpful.
I am attempting to get admitted onto the Bugzilla at the moment for the data frame cases, fingers crossed!
Best Regards,Mark Webster
[[alternative HTML version deleted]]
2018 Aug 03
0
glm Argument-Evaluation Does Not Match Documentation.
...rom `data` whose parent is `environment(formula)`.) Side effects of evaluating the arguments will usually NOT occur in the caller's frame."
I think this is correct, but what really happens is inside other functions with unusual argument evaluation, so I'm not certain.
Regards,
Jorgen Harmse
Sam?s Club Technology
Phone 512.633.2226
jorgen.harmse at samsclub.com
This e-mail and any files transmitted with it are confidential and intended solely
for the individual or entity to whom they are addressed. If you have received
this e-mail in error, destroy it immediately. Wal-Mart Con...
2024 Mar 20
1
Building Packages.
I have a source file with oxygen-style comments (and description & licence files), and I?m trying to build a package. oxygen & devtools seem to work, and the tarball exists, but install.packages balks. Does anyone know what?s happening?
Regards,
Jorgen Harmse.
> roxygenise(package.dir,clean=TRUE)
Setting `RoxygenNote` to "7.3.1"
? roxygen2 requires "Encoding: UTF-8"
? Current encoding is NA
? Loading jhBase
Warning: ?? Conflicts ????????????????????????????????????????????????????????????????????????????????????????????????...
2023 Nov 06
0
I need to create new variables based on two numeric variables and one dichotomize conditional category
...ts or confusing argument names.")
return(L[[1L]])
}
if (missing(yes1))
{ if (length(L <- list(...)) != 0L)
stop("Wrong number of arguments or confusing argument names.")
return(test1)
}
return( ifelse(test1, yes1, ifelses(...)) )
}
Regards,
Jorgen Harmse (not Jordan).
------------------------------
Message: 10
Date: Sat, 4 Nov 2023 01:08:03 -0400
From: <avi.e.gross at gmail.com>
To: "'Jorgen Harmse'" <JHarmse at roku.com>
Cc: <r-help at r-project.org>
Subject: Re: [R] [EXTERNAL] RE: I need to create new variabl...
2025 Jan 07
2
Extracting specific arguments from "..."
...der Americans Independence Center;
Senior Statistician University of Maryland Center for Vascular Research;
Division of Gerontology and Paliative Care,
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
Cell phone 443-418-5382
________________________________________
From: Jorgen Harmse <JHarmse at roku.com>
Sent: Tuesday, January 7, 2025 1:47 PM
To: r-help at r-project.org; ikwsimmo at gmail.com; Bert Gunter; Sorkin, John; jdnewmil at dcn.davis.ca.us
Subject: Re: Extracting specific arguments from "..."
Interesting discussion. A few things occurred to me.
Apolog...
2025 Jan 07
1
Extracting specific arguments from "..."
...to another function >}
else
{ <inspect or modify a> # Pitfall: Changing the order of evaluation may break old code, but then the design was probably too devious in the first place.
<pass ?, a=a to another function>
}
<do something with the output>
}
Regards,
Jorgen Harmse.
[[alternative HTML version deleted]]
2024 Mar 20
1
Building Packages.
...the utils
> package.
>
> Duncan Murdoch
>
>>
>> Duncan Murdoch
>>
>>>
>>> ????? Ben Bolker
>>>
>>> On 2024-03-20 12:13 p.m., Ivan Krylov via R-help wrote:
>>>> ? Wed, 20 Mar 2024 16:02:27 +0000
>>>> Jorgen Harmse via R-help <r-help at r-project.org> ?????:
>>>>
>>>>>> install.packages(tar,type='source',repos=NULL)
>>>>>
>>>>> Error in library(jhBase) : there is no package called ?jhBase?
>>>>>
>>>>> Execu...
2025 Jan 07
1
Extracting specific arguments from "..."
...rsity of Maryland Center for Vascular Research;
>
> Division of Gerontology and Paliative Care,
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> Cell phone 443-418-5382
>
>
>
>
> ________________________________________
> From: Jorgen Harmse <JHarmse at roku.com>
> Sent: Tuesday, January 7, 2025 1:47 PM
> To: r-help at r-project.org; ikwsimmo at gmail.com; Bert Gunter; Sorkin, John; jdnewmil at dcn.davis.ca.us
> Subject: Re: Extracting specific arguments from "..."
>
> Interesting discussion. A few thing...
2024 Mar 20
2
Building Packages.
...t that RStudio replaces the install.packages object in the utils
package.
Duncan Murdoch
>
> Duncan Murdoch
>
>>
>> Ben Bolker
>>
>> On 2024-03-20 12:13 p.m., Ivan Krylov via R-help wrote:
>>> ? Wed, 20 Mar 2024 16:02:27 +0000
>>> Jorgen Harmse via R-help <r-help at r-project.org> ?????:
>>>
>>>>> install.packages(tar,type='source',repos=NULL)
>>>>
>>>> Error in library(jhBase) : there is no package called ?jhBase?
>>>>
>>>> Execution halted
>>>...