force.numeric: Force numerical variable to be numeric in a dataframe

View source: R/force.numeric.R

force.numericR Documentation

Force numerical variable to be numeric in a dataframe

Description

Force numerical variable to be numeric in a dataframe

Usage

force.numeric(data)

Arguments

data

a dataframe.

Value

The dataframe with numerical variables where it is possible.

Examples

tablo <- data.frame("A"=as.character(rnorm(20)),"B"=c(rnorm(5),"C3",rnorm(4)),"C"=rep("A",10))
apply(tablo,2,is.numeric)
force.numeric(tablo)-> tablo2 ; apply(tablo2,2,is.numeric)


Antoine-Masse/KefiR documentation built on July 4, 2024, 11:40 a.m.