0

I am trying to read a csv file that contains data for herbarium specimens. The file has data like, ID, Kingdom, Phylum, Class...etc. I only need the ID, Year, Latitude, Longitude data. The line I used for the CNH herbarium worked for several other herbaria, but not for CNH. As far as I can tell, each of the csv files are formatted exactly the same and contain the same types of data. I would deeply appreciate any help.

The line I used:

CNH<- read.csv(file = "Herbarium Data/Herbaria/CNH.csv", header = T)

The error:

Error in type.convert.default(data[[i]], as.is = as.is[i], dec = dec, : invalid multibyte string at '48'<20>33"" N, 7215' 15"" W'

enter image description here

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 2
    This seems like an encoding issue. Can you post the file or maybe its encoding? Try to play with the `fileEncoding` parameter of the `read.csv` function. – Daniel R Jul 07 '20 at 18:32
  • Maybe this helps: https://stackoverflow.com/questions/14363085/invalid-multibyte-string-in-read-csv – S Rivero Jul 07 '20 at 18:34

0 Answers0