Learn R Programming

broman (version 0.59-5)

openfile: Open a file

Description

Open a file using system and open.

Usage

openfile(file)

Arguments

file
File name (character string)

Value

  • None.

Details

I'd thought that to open a file you'd use open in MacOS and start in Windows, but system("start myfile.pdf") doesn't work in Windows, but rather system("open myfile.pdf") does, so here we're just using

Examples

Run this code
openfile("myplot.pdf")

Run the code above in your browser using DataLab