Learn R Programming

micompr (version 1.2.0)

pvalnum: Make sure p-values are numeric

Description

Make sure p-values are numeric. Non-numeric values (e.g., "<0.001") are converted to zero.

Usage

pvalnum(pvals)

Value

A vector of fully numeric p-values.

Arguments

pvals

Vector of p-values which might not be fully numeric.

Examples

Run this code
micompr:::pvalnum(c("0.06", "0.9", "<0.0001", "0.3"))
# [1] 0.06 0.90 0.00 0.30

Run the code above in your browser using DataLab