fix_num: Fix number format in vector

View source: R/help_funs.R

fix_numR Documentation

Fix number format in vector

Description

This function takes a vector and converts numbers or percentages into numeric form while ignoring character columns for easy full data frame procesing. (With dplyr::across for example)

Usage

fix_num(nums)

Arguments

nums

Range of years to pull from nflreadr rosters. Defaults to 2020

Value

converted data to correct numeric form (eg. "20%" to 0.2 and "2.3" to 2.3)


SCasanova/pfrefscrape documentation built on Aug. 21, 2022, 8:32 p.m.