Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

R (R 3.5.2) sample

f <- file("stdin")
open(f)
 
while(length(n <- as.integer(readLines(f,n=1))) > 0) {
	if (n == 42) {
		break;
	}
	write(n, stdout())
}
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #R #sample
ADD COMMENT
Topic
Name
2+2 =