[R] R-help Digest, Vol 212, Issue 4
Izmirlian, Grant (NIH/NCI) [E]
|zm|r||g @end|ng |rom m@||@n|h@gov
Mon Oct 5 19:05:51 CEST 2020
Hi -- there are lots of replies --I have not read them all, if someone else suggested this, sorry for duplication. This is similar to the suggestion using mapply, but not specific to matrices. In fact it's a kludge that applies to many settings. You 'sapply' over the index 1:2, and pass a, b as arguments:
a <- c(1,4)
b <- c(5,8)
sapply(1:2, FUN=function(x, a, b)a[x]:b[x], a=a,b=b)
-----Original Message-----
From: r-help-request using r-project.org <r-help-request using r-project.org>
Sent: Monday, October 05, 2020 6:04 AM
To: r-help using r-project.org
Subject: R-help Digest, Vol 212, Issue 4
Send R-help mailing list submissions to
r-help using r-project.org
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-help
or, via email, send a message with subject or body 'help' to
r-help-request using r-project.org
You can reach the person managing the list at
r-help-owner using r-project.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of R-help digest..."
More information about the R-help
mailing list