comma_to_semicolon: Replaces commas by semicolons inside of a file

Description Usage Arguments Examples

View source: R/comma_to_semicolon.R

Description

Replaces all commas by semicolons in a file and overwrites the file. The function is actually capable of replacing other strings too, but that is not the standard.

Usage

1
comma_to_semicolon(file, pattern = ",", replacement = ";")

Arguments

file

the file to modify.

pattern

the string to replace.

replacement

the replacement.

Examples

1
2
3
4
5
6
table <- cbind(1:10, LETTERS[1:10])
# this will create a file in the working dir
write.csv(table, file = "comma_to_semicolon_example.csv")
read.csv("comma_to_semicolon_example.csv")
comma_to_semicolon("comma_to_semicolon_example.csv")
read.csv("comma_to_semicolon_example.csv")

mtcruz/mtcruzr documentation built on Dec. 26, 2019, 11:04 p.m.