Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

apollo_setRows

Sets specified rows to a given value


Description

Given a numeric object (scalar, vector, matrix or 3-dim array) sets a subset of rows to a given value.

Usage

apollo_setRows(v, r, val)

Arguments

v

Numeric scalar, vector, matrix or 3-dim array. Rows of this object will be replaced by val and

r

Boolean vector. As many elements as rows in v. TRUE for replacing that row, FALSE for not changing it.

val

Numeric scalar. Value to which the specified rows must be set to.

Value

The same argument v but with the rows where r==TRUE set to val.


apollo

Tools for Choice Model Estimation and Application

v0.2.4
GPL-2
Authors
Stephane Hess [aut], David Palma [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.