我的数据集是这样的:
structure(list(Data = structure(c(1672531200, 1669852800, 1667260800,
1664582400, 1661990400, 1659312000, 1656633600, 1654041600, 1651363200,
1648771200), class = c("POSIXct", "POSIXt"), tzone = "UTC"),
index = c(99.1, 96.2, 110.2, 105.4, 108, 80.4, 109.3, 109.9,
115.6, 104.7)), row.names = c(NA, -10L), class = c("data.table",
"data.frame"), .internal.selfref = <pointer: 0x000001f72620e040>)
我从一个网站上下载的:
url_IPI <- "https://www.idescat.cat/indicadors/?id=conj&n=10277&col=1&f=ssv"
destfile_IPI <- "G:/SUBDIRECCIO-ESTUDIS/PROJECTES/Automatitzar gràfics/Scripts R/IPI.csv"
download.file(url_IPI, destfile_IPI)
IPI <- fread("G:/SUBDIRECCIO-ESTUDIS/PROJECTES/Automatitzar gràfics/Scripts R/IPI.csv", header=TRUE, dec = ",", encoding = "UTF-8")
如何将..
替换为整个数据集中的空格?
1条答案
按热度按时间ds97pgxw1#
也许您正在寻找
na.strings
参数,文件体中的所有".."
都将被替换为NA
。