From hugh@p@r@on@ge @end|ng |rom gm@||@com  Fri Sep 27 12:59:12 2019
From: hugh@p@r@on@ge @end|ng |rom gm@||@com (Hugh Parsonage)
Date: Fri, 27 Sep 2019 20:59:12 +1000
Subject: [Rd] Evaluate part of an expression at C level
In-Reply-To: <CAL0QV_NQOJ4KdyTs60wUQ3wuC8+4zyCOE=+xC9n+b7jFBE221g@mail.gmail.com>
References: <CAL0QV_NQOJ4KdyTs60wUQ3wuC8+4zyCOE=+xC9n+b7jFBE221g@mail.gmail.com>
Message-ID: <CAJmOi+OOVwBhBRsfZ-nHiG98J+4VsuL+Xx6Xg_7wQSHtVc+WSw@mail.gmail.com>

You may be trying to do something similar to hutilscpp::which_first(x < 5)
which does most of its work at the R level. That is notice an expression is
of the form lhs operator rhs then evaluate each element of lhs separately




On Fri, 27 Sep 2019 at 8:35 pm, Morgan Morgan <morgan.emailbox at gmail.com>
wrote:

> Hi,
>
> I am wondering if the below is possible?
> Let's assume I have the following expression:
>
> 1:10 < 5
>
> Is there a way at the R C API level to only evaluate the 5th element (i.e 5
> < 5) instead of evaluating the whole expression and then select the 5th
> element in the logical vector?
>
> Thank you
> Best regards
> Morgan
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] Evaluate part of an expression at C level
Hugh Parsonage