我在将数据加载到 R 时遇到问题:
fileUrl <- "http://jadi.net/files/iran_it_status_1394_detail_data_jadi_net.tsv"
download.file(fileUrl , destfile="iran_it_status_1394_detail_data_jadi_net.tsv")
dev <- read.delim("iran_it_status_1394_detail_data_jadi_net.tsv",
header=TRUE,sep="\t",blank.lines.skip = TRUE,
na.strings="",fileEncoding="UTF-8",
stringsAsFactors=FALSE,skipNul = TRUE)
我收到以下错误:
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
In addition: Warning message:
In read.table(file = file, header = header, sep = sep, quote = quote, :
invalid input found on input connection 'iran_it_status_1394_detail_data_jadi_net.tsv'
编辑:数据集有 1217 行和 33 个变量。
names(data) <- c("timestamp","age","sex","birth_province","work_province","experience","education",
"certificate","learn","project","book","language","wish_language","db","desktop_os",
"wish_os","mobile","env","theme","src_ctrl","tab_space","drink","items","device","title",
"org_type","org_emp","income","perk","job_contract","job_type","hour_wage","happy")
对于语言变量,我期望这个输出:
data[1:3,"language"]
C#、Javascript、R、SQL
Java、C#、Javascript、Objective C、Swift、SQL
C#, SQL
也欢迎 Python 解决方案