Quantcast

error message - unexpected input

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

error message - unexpected input

Danielle Dandreaux
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=""

 

Does anyone have any suggestions?

 

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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error message - unexpected input

David Winsemius

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]]
>
> ______________________________________________
> [hidden email] 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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error message - unexpected input

Duncan Murdoch
In reply to this post by Danielle Dandreaux
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=""
>
>  
>
> Does anyone have any suggestions?
>  

That definitely looks like a problem with the quotes.  I would strongly
recommend against using MS Word as a text editor for this.  You'd be
better off using Notepad, or the built in script editor in R (both of
which are pretty feeble editors, but adequate), or a better one like
WinEdt, Tinn-R, Emacs, etc.

Duncan Murdoch

>  
>
> 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]]
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error message - unexpected input

Jim Lemon
In reply to this post by David Winsemius
On 10/09/2009 07:15 AM, David Winsemius wrote:
>
> On Oct 8, 2009, at 3:28 PM, Danielle Dandreaux wrote:
> ...
> The syntax line that appears to be causing problems is:
> dataname="Igt2model.txt" and the error message is: Error: unexpected
> input in "dataname=""
>
Hi Danielle,
This sort of error often occurs when the line is a continuation and
there is something like a trailing comma missing on the previous line.

Jim

______________________________________________
[hidden email] 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.
Loading...