ilog: Echo a copy of console to log file

Description Usage Arguments Details Author(s) See Also Examples

View source: R/ilog.R

Description

ilog echo a copy of your console to log file.

Usage

1
2
3
ilog(logfile = "<unnamed>.txt", append = FALSE)

ilog.close()

Arguments

logfile

Name of desired log file in .txt format

append

a logical value

Details

ilog is a two-step function that allows you a record of your console. A log is a file containing what you type and console output. If a name is not specified, then ilog will use the name <unnamed>.txt.

ilog opens a log file and ilog.close close the file.

Warnings:

Clearing the global environment while logging will interrupt the logging process. In that case, console prompt will be stuck at log> . Run the code below to get the console prompt back to normal.

options(prompt = "> ", continue = "+ ")

Acknowledgement: ilog and ilog.close are inspriations from STATA software.

Author(s)

Myo Minn Oo (Email: dr.myominnoo@gmail.com | Website: https://myominnoo.github.io/)

See Also

clear

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
## my first log
ilog("myfirstlog.txt")
str(infert)
tab(infert$education)
str(iris)
isum(iris$Sepal.Length)
ilog.close()

## appending the file.
ilog("myfirstlog.txt", append = TRUE)
summary(infert)
summary(iris)
ilog.close()

## End(Not run)

myominnoo/stats2 documentation built on Nov. 4, 2019, 8:33 p.m.