title: R Error in columns and type.convert(data[[i]], specifically on Mac
body: <p>I am trying to make R read my CSV file (which contains numerical and categorical data). I am able to open this file on a Windows computer(I tried different ones and it always worked) without any issues, but it is not working on my Mac at all. I am using the latest version of R. Originally, the data was in Excel and then I converted it to csv.</p>
  
  <p>I have exhausted all my options, I tried recommendations from similar topics but nothing works. One time I sort of succeeded but the result looked like this: ;32,0;K;;B;50;;;; I tried the advice given in this topic <a href="https://stackoverflow.com/questions/1874443/import-data-into-r-with-an-unknown-number-of-columns">Import data into R with an unknown number of columns?</a> and the result was the same. I am a beginner in R and I really know nothing about coding or programming, so I would appreciate tremendously any kind of advice on this issue.Below are my feckless attempts to fix this problem:</p>
  
  <pre><code>&gt; file=read.csv("~/Desktop/file.csv", sep = ";")
  Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L))    : 
  invalid multibyte string at '&lt;ca&gt;110'
  &gt; file=read.csv("~/Desktop/file.csv", sep = " ")
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  duplicate 'row.names' are not allowed
  &gt; ?read.csv
  &gt; file=read.csv2("~/Desktop/file.csv", sep = ";")
  Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) : 
  invalid multibyte string at '&lt;ca&gt;110'
  &gt; file=read.csv2("~/Desktop/file.csv", sep = ";", header=TRUE)
  Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) : 
  invalid multibyte string at '&lt;ca&gt;110'
  &gt; file=read.csv("~/Desktop/file.csv", sep=" ",row.names=1)
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  duplicate 'row.names' are not allowed
  &gt; file=read.csv("~/Desktop/file.csv", row.names=1)
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  more columns than column names
  &gt; file=read.csv("~/Desktop/file.csv", sep=";",row.names=1)
  Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) : 
  invalid multibyte string at '&lt;ca&gt;110'
  </code></pre>
  
  <p>This is what the header of the data looks like. So using the advice below, I saved the document in the CSV format for Mac and once I executed the View(file) function, everything looked ok, except for some rows like the row#1 (Cord Number 1) below, it was completely misplaced :</p>
  
  <pre><code>    Cord.Number Ply Attch   Knots   Length  Term    Thkns   Color   Value   
  1,S,U,,37.0,K,,MB,,,"5.5 - 6.5:4, 8.0 - 8.5:2",,UR1031,unknown,             
  1s1 S   U   1S(5.5/Z) 1E(11.5/S)    46.5    K   NA  W   11  
  1s2 S   U   1S(5.5/Z) 5L(11.0/Z)    21.0    B   NA  W   15
  </code></pre>
  
  <p>This is what the spreadsheet looks like in R Studio on Windows (I don't have enough reputation to post an image):
  <a href="https://imgur.com/zQdJBT2" rel="nofollow noreferrer">http://imgur.com/zQdJBT2</a></p>