Learn R Programming

SciencesPo (version 1.3.9)

dotfy: Replace commas by dots

Description

Replace commas by dots in that order.

Usage

dotfy(x)

Arguments

x
A vector whose elements contain commas or commas and dots.

encoding

UTF-8

Details

This function works for numeric vectors, typically currency variables stored in non-english format.

Examples

Run this code
x <- c('500,00', '0,001', '25.000', '10,100.10', 'him, you, and I.')

dotfy(x)

Run the code above in your browser using DataLab