men <- read.csv("/home/xuefliang/Downloads/men.csv",header = F) b <- grep("社区卫生服务中心",men$V1) length(b) a <- grepl("社区卫生服务中心",men$V1) #grep仅返回匹配项的下标,而grepl返回所有的查询结果,并用逻辑向量表示有没有找到匹配。windows csv文件ANSI编码需用记事本修改为UTF-8
1.cp -r ~/R/x86_64-pc-linux-gnu-library/3.1/* ~/R/x86_64-pc-linux-gnu-library/3.2 # at the shell prompt 2.update.packages(checkBuilt=TRUE, ask=FALSE) #at the R prompt