[R-SIG-Mac] error message re 'expected a real'

Sean Davis sdavis2 at mail.nih.gov
Mon Apr 7 02:03:14 CEST 2008


On Sun, Apr 6, 2008 at 7:41 PM, David Kaplan <dkaplan at education.wisc.edu> wrote:
>
>  Hi Sean,  thanks for taking the time to answer this.  That wasn't the
> problem, as far as I can tell.  I've attached the input and the data file
> (significantly reduced).  The package is sem.
>
>  David
>
>  ===============================================================
> David Kaplan, Ph.D.
> Professor
> Department of Educational Psychology
> University of Wisconsin - Madison
> Educational Sciences, Room, 1061
> 1025 W. Johnson Street
> Madison, WI 53706
>
> email: dkaplan at education dot wisc dot edu
> homepage:
> http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm
> Phone: 608-262-0836
> ===============================================================
>
>
>
>
>
>
>  Sean Davis wrote:
>  On Sun, Apr 6, 2008 at 6:13 PM, David Kaplan <dkaplan at education.wisc.edu>
> wrote:
>
>
>  Hi all,
>
>  I sent this to the general list, but I wasn't sure if it was Mac related.
>
>  I'm running the program sem on a Mac, but I'm getting a message that I
> think is quite general. The error reads
>
>  Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
>  scan() expected 'a real', got '10652)'
>
>
>  The 10652 is the sample size coming from a .csv file where I have header =
> TRUE.
>
>  Any thoughts would be appreciated.
>
>  Hi, David. It looks like you have a parenthesis next to the number;
> that would explain the error. If that isn't the issue, you'll want to
> include a self-contained example that reproduces the error.
>
> Hope that helps.
>
> Sean

David,

Feel free to reply to the list; everyone learns by doing so.

I'm just guessing, but it looks like the file that you sent is an
excel spreadsheet.  It was impossible to tell, though.  You will need
to save that as a text file (csv) from excel before you can read it
into R using read.csv().  Your file should be entirely readable in
textedit if you want to read it with read.csv().  If I am incorrect
about the file type, then you'll need to send along a text version.

Sean



More information about the R-SIG-Mac mailing list