imxReportProgress: Report backend progress

View source: R/MxRun.R

imxReportProgressR Documentation

Report backend progress

Description

Prints a show status string to the console without emitting a newline.

Usage

imxReportProgress(info, eraseLen)

Arguments

info

the character string to print

eraseLen

the number of characters to erase

Examples

library(OpenMx)

previousLen <<- 0

easyReportProcess <- function(msg) {
	imxReportProgress(msg, previousLen)
	previousLen <<- nchar(msg)
}

demo <- function() {
	easyReportProcess("abc123")
	Sys.sleep(1)
	easyReportProcess("this is much longer")
	Sys.sleep(1)
	easyReportProcess("this is short")
	Sys.sleep(1)
	easyReportProcess("almost done")
	Sys.sleep(1)
	easyReportProcess("")
	cat("DONE!", fill=TRUE)
}

demo()

OpenMx documentation built on Oct. 19, 2024, 9:06 a.m.