[R-SIG-Mac] A .csv question

Roy Mendelssohn Roy.Mendelssohn at noaa.gov
Tue Apr 8 20:24:07 CEST 2008

A guess, and only a guess, but a csv file at heart is a text file,  
and I would assume it has PC line-enders, which could cause problems.

-Roy M.

On Apr 8, 2008, at 11:11 AM, David Kaplan wrote:
> Hi,
> No doubt I'm writing to the wrong R list and some cranky person will
> flame me as a reminder, but I seem to have this problem just on the  
> Mac
> version of R.  Here is the scenario.   I am using SPSS on the PC to  
> save
> a file as a .csv.  I then bring this file into R and have it read the
> file as a .csv.  When I look at the file in Mac Excel, it looks like a
> regular spreadsheet without commas as I might expect.  When I run the
> model, I get the message
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines,
> na.strings,  :
>   scan() expected 'a real', got '3196)'
> The 3196 is the sample size used for this analysis and it is  
> correct.  I
> can ask it to print the data and the correlation matrix, and  
> everything
> seems fine.  There are no additional characters (such as a  
> parentheses)
> in the file.  My students who are doing this analysis for a class
> assignment do not seem to have a problem on the PC, so I am  
> wondering if
> anyone has encountered an incompatibility problems.
> Thanks in advance, and I apologize if this is the wrong list.
> 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
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

"The contents of this message do not reflect any position of the U.S.  
Government or NOAA."
Roy Mendelssohn
Supervisory Operations Research Analyst
Environmental Research Division	
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."

More information about the R-SIG-Mac mailing list