filter_na: Removes lines with NA.

Description Usage Arguments Value Examples

View source: R/read_clean_output.R

Description

Removes the lines with NA in simulation and remove the corresponding rows in (parameter).

Usage

1
filter_na(simulation, parameter)

Arguments

simulation

A matrix of real numbers.

parameter

A matrix of real numbers with the same number of rows as simulation.

Value

A list containing as first element filtered_simulation (i.e. without rows with NA), as second element filtered_parameter (i.e. without the rows with the same index as the ones removed from simulation) and as third element the indexes of the rows of simulation with NA.

Examples

1
2
3
4
5
simulation <- rnorm(10 * 5)
simulation[sample(1:(10 * 5), 5)] <- NA
simulation <- matrix(simulation, 10, 5)
parameter <- matrix(rnorm(10 * 9), 10, 9)
filter_na(simulation = simulation, parameter = parameter)

YoannAnciaux/dfeSingleMutationsAcrossEnvironmentsBankAndBolon documentation built on Oct. 31, 2019, 1:19 a.m.