File: helloworld.r

package info (click to toggle)
rapache 1.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,248 kB
  • sloc: sh: 18,629; ansic: 10,417; perl: 5,675; javascript: 2,800; makefile: 307
file content (35 lines) | stat: -rw-r--r-- 592 bytes parent folder | download | duplicates (4)
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
setContentType("text/html")
setHeader("foo","bar")
setCookie("foo","bar",Sys.time()+1000)
cat("<html><body><h1>Hello World!</h1>")
cat("<pre>")
print(warnings())
cat("search:\n")
print(search())

cat("\n.GlobalEnv:\n")
print(ls(globalenv()))

assign("gfoo","gbar",.GlobalEnv)
if (exists("foo")){
	foo <- foo + 1
} else {
	foo <- 1
}
cat("foo is",foo,"\n<br>");

cat("\nls():\n")
print(ls())

if (!is.null(GET)){
	for (i in 1:length(GET) ){
		cat("\t",names(GET)[i],":",GET[[i]],"\n")
#		cat("\t",GET[[i]],"\n")
	}
} else {
	cat("\nGET is NULL.\n")
}

cat("</pre>")
cat("</body></html>")
DONE