[R] error message - unexpected input

David Winsemius dwinsemius at comcast.net
Thu Oct 8 22:15:39 CEST 2009


On Oct 8, 2009, at 3:28 PM, Danielle Dandreaux wrote:

> I have been using R the past couple of years to run models on data we
> are collecting. I recently got a new computer and updated to a new
> version of R (2.60 -> 2.90). Since the update, I cannot get my  
> syntax to
> run. I have tried copying the file it is looking for into many  
> different
> directories to try and run it. In the last version, I found that it  
> was
> easiest if the file was copied into the R program file folder. I have
> also tried changing the font the code is written in and turning off
> "smart quotes" in MS word. Additionally, I have right clicked on R and
> set myself as the only user on this computer to run this program. The
> syntax line that appears to be causing problems is:
> dataname="Igt2model.txt" and the error message is: Error: unexpected
> input in "dataname=""

Simply entering that line at the console should not produce an error.

>
> Does anyone have any suggestions?

1) Full code rather than your guesses about what is wrong.
2) results of getwd()
3) whether you can find that file in that working directory using your  
OS's file access methods (I'm assuming this is Windows?).

-- 
David
>
>
>
> Thanks for all of your help,
>
> Danielle
>
>
>
> Danielle Dandreaux, Ph.D.
>
> Faculty Research Associate
>
> Arizona State University
>
> Department of Psychology
>
> Tempe, AZ 85287
>
> 480-965-3053
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list