File: test1.R

package info (click to toggle)
littler 0.3.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: ansic: 586; sh: 132; makefile: 5
file content (16 lines) | stat: -rwxr-xr-x 194 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env r
cat("hello world!\n"); 
for (i in 1:10){
	cat("i is",i,"\n");
}

foo <- function(x=1){
	if (x == 1){
		cat("x is 1\n");
	} else {
		cat("x is",x,":NOT 1\n");
	}
}
foo(2)
foo()