Learn R Programming

knitrdata (version 0.6.1)

platform.newline: Platform independent newline string

Description

A simple function to determine the appropriate newline string for a given operating system.

Usage

platform.newline(os = .Platform$OS.type)

Arguments

os

Name of the operating system. Defaults to .Platform$OS.type

Value

For Windows, this should return '\r\n', whereas for other operating system it will return '\n'.

See Also

See also file.type.