公卫百科  > 所属分类  >  R/S+   
[0] 评论[0] 编辑

读入纯文本型数据框

 Use the read.table function, which returns a data frame: 公卫考场

> dfrm <- read.table("filename.txt")

To prevent read.table from interpreting character strings as factors, set the stringsAs
Factors parameter to FALSE: 公卫家园
> dfrm <- read.table("statisticians.txt", stringsAsFactor=FALSE)
> class(dfrm$V1)
[1] "character"

If any field contains the string “NA”, then read.table assumes that the value is missing 公卫家园
and converts it to NA. Your datafile might employ a different string to signal missing
values; if it does, use the na.strings parameter. The SAS convention, for example, is 公卫人
that missing values are signaled by a single period (.). We can read such datafiles like
this:
> dfrm <- read.table("filename.txt", na.strings=".")

附件列表


0

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

如果您认为本词条还有待完善,请 编辑

上一篇 搜索网页格式的帮助    下一篇 读入.csv文件

同义词

暂无同义词