[R] Error occurring

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Nov 24 22:18:42 CET 2016


If I was to make a totally wild leap,  I would say it looks like someone using an inappropriate text editor such as Microsoft Word to edit R code.

Stuti, please carefully read and follow the recommendations in the Posting Guide mentioned at the bottom of this and every post on this mailing list before posting again. R is a plain text language, and this list is a plain text mailing list. 
-- 
Sent from my phone. Please excuse my brevity.

On November 24, 2016 12:44:11 PM PST, Rui Barradas <ruipbarradas at sapo.pt> wrote:
>Hello,
>
>I don't see the error you mention.
>
>j <- function() {
>	if(!exists ("a")){
>		a <- 1
>	} else{
>		a <- a+1
>	}
>	 print(a)
>}
>
>j()
>[1] 1
>
>
>sessionInfo()
>R version 3.3.2 (2016-10-31)
>Platform: x86_64-w64-mingw32/x64 (64-bit)
>Running under: Windows 7 x64 (build 7601) Service Pack 1
>
>locale:
>[1] LC_COLLATE=Portuguese_Portugal.1252 
>LC_CTYPE=Portuguese_Portugal.1252
>[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C 
>
>[5] LC_TIME=Portuguese_Portugal.1252
>
>attached base packages:
>[1] stats     graphics  grDevices utils     datasets  methods   base
>
>loaded via a namespace (and not attached):
>[1] tools_3.3.2
>
>Rui Barradas
>
>Em 24-11-2016 07:43, Stuti Verma escreveu:
>>> 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]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list