[R] Error occurring

Stuti Verma stuti.verma284 at gmail.com
Thu Nov 24 08:43:48 CET 2016


> j <- function() {
+ if(!exists ("a")){
+ a <- 1
+ } else{
+ a <- a+1
+ } print(a)}

Error: unexpected symbol in:
"a <- a+1
} print"

> j <- function() {
+ if(!exists ("a")){
+ a <- 1
+ } else{
+ a <- a+1
+ } print("a")}

Error: unexpected symbol in:
"a <- a+1
} print"

	[[alternative HTML version deleted]]



More information about the R-help mailing list