R Debug

1. 虽然说逗号的bug,但其实是多了个( 

2. read.csv 报:

   '<ca><c7>'多字节字符串有错  

  Error in read.table(file = file, header = header, sep = sep, quote = quote, : 输入中没有多出的行

   Cause: 编码错误,因为有中文。

   Solution:此时把文本csv另存为CSV UTF-8(逗号分隔),重新读取即可。

   

 3.  join()数据框报错误: 错误: Can't join on `x$invSampleName` x `y$invSampleName` because of incompatible types. 

  Cause:两个文件的key不是同一类型,转换integer为character后即可。

   > repeat_fourth$invSampleName<-as.character(repeat_fourth$invSampleName)

   > data_join<-dplyr::inner_join(repeat_fourth,code_fourth,by="invSampleName")

  

原文地址:https://www.cnblogs.com/koujiaodahan/p/15668999.html