File: imxReportProgress.Rd

package info (click to toggle)
r-cran-openmx 2.21.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,412 kB
  • sloc: cpp: 36,577; ansic: 13,811; fortran: 2,001; sh: 1,440; python: 350; perl: 21; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\name{imxReportProgress}
\alias{imxReportProgress}
\title{Report backend progress}
\usage{
imxReportProgress(info, eraseLen)
}
\arguments{
\item{info}{the character string to print}

\item{eraseLen}{the number of characters to erase}
}
\description{
Prints a show status string to the console without emitting a
newline.
}
\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)
}

\donttest{demo()}
}